🐛 Bug: isTypeParameter should not be a type guard #382
Labels
status: accepting prs
Please, send a pull request to resolve this! 🙏
type: bug
Something isn't working :( 🐛
Bug Report Checklist
main
branch of the repository.Expected
I'd expect code like this to produce the expected types:
Actual
The TS type of
type
in theelse
branch isnever
. This doesn't match reality at runtime, where theelse
branch is very much alive.Additional Info
The issue is that this is how the types are declared in
typescript.d.ts
:i.e.
TypeParameter = Type
.So long as that's the case, it would be better if
isTypeParameter
were not declared as a type guard.The text was updated successfully, but these errors were encountered: