Assignability checks in API #13502
Copy link
Copy link
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
Could isTypeAssignableTo be exposed on the type-checker for use by API consumers? This would be helpful for analyzing code using type information. I would like to check instanceof expressions for assignability in a lint rule (palantir/tslint#2046).
getBaseConstraintOfType would also be useful for doing checks inside generic functions.
isTypeAssignableTo would also be useful for a no-unnecessary-cast rule.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Activity
andy-hanson commentedon Jan 16, 2017
On that note, it would be useful to have some way of accessing control flow information too. palantir/tslint#2038 (comment)
danvk commentedon Jan 22, 2017
Related to #11728
I'd also like have this exposed for danvk/typings-checker#15
andy-hanson commentedon Feb 27, 2017
Would be resolved by #9943.
mhegazy commentedon Nov 1, 2017
Duplicate of #9879
typescript-bot commentedon Nov 16, 2017
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.