Open coolsoftwaretyler opened 3 weeks ago
Bug report
Sandbox link or minimal reproduction code
https://codesandbox.io/p/sandbox/isoptional-type-bug-repro-9h8cqg?file=%2Fsrc%2Findex.ts%3A11%2C6-12%2C1
Describe the expected behavior
x shouldn't be type never. Should be ISimpleType<number>
x
never
ISimpleType<number>
Describe the observed behavior
TypeScript thinks x is of type never:
The same is true of others: isIdentifierType, isLiteralType, isPrimitiveType, isReferenceType, isUnionType, maybe others I haven't tried.
Updated the title to reflect that (pun intended). Thank you!
Bug report
Sandbox link or minimal reproduction code
https://codesandbox.io/p/sandbox/isoptional-type-bug-repro-9h8cqg?file=%2Fsrc%2Findex.ts%3A11%2C6-12%2C1
Describe the expected behavior
x
shouldn't be typenever
. Should beISimpleType<number>
Describe the observed behavior
TypeScript thinks
x
is of typenever
: