You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Octokit}from"@octokit/rest";functiontest(a?: Octokit){if(a===undefined){return;}// `a` is now narrowed to `never`constr=a.repos;// typechecking fails as `never` has no property `repos`}
Checklist
Environment
Versions
18.5.6
What happened?
Playground link
This only happens in TS 4.3.
What should happen:
a
should not be narrowed tonever
I suspect it is due to the type of
Octokit
being an intersection withvoid
:The text was updated successfully, but these errors were encountered: