Skip to content

Assignability checks in API #13502

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.

Activity

  1. andy-hanson commented on Jan 16, 2017

    @andy-hanson
    Author

    On that note, it would be useful to have some way of accessing control flow information too. palantir/tslint#2038 (comment)

  2. danvk commented on Jan 22, 2017

    @danvk
    Contributor

    Related to #11728

    I'd also like have this exposed for danvk/typings-checker#15

  3. andy-hanson commented on Feb 27, 2017

    @andy-hanson
    Author

    Would be resolved by #9943.

  4. mhegazy commented on Nov 1, 2017

    @mhegazy
    Contributor

    Duplicate of #9879

  5. added
    DuplicateAn existing issue was already created
    and removed
    Needs InvestigationThis issue needs a team member to investigate its status.
    on Nov 1, 2017
  6. typescript-bot commented on Nov 16, 2017

    @typescript-bot
    Contributor

    Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

  7. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions