-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
If you have code like this:
let p: { toFixed: () => string };And if you use TSUtils.isTypeAssignableToNumber(checker, type) where type comes from the AST and refers to a type like: { toFixed: () => string };, it should return true, but it returns false. This also happens for the type { } which should also return true for any number. Similar issues happens for isTypeAssignableToString.
This TS playground link demonstrates that all of these are assignable to either number or string, but I get the wrong value from isTypeAssignableToNumber/String in all cases:
I'm using TS 4.7.2 by the way and TSUtils 3.17.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels