10000 Expose more functions of compiler api to public (from TypeChecker and Program) · Issue #17680 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Expose more functions of compiler api to public (from TypeChecker and Program) #17680
@Busyrev

Description

@Busyrev

I'm using compiler api for many code transformations, using Transformation Api (#13762) and Printing api(#13761). I can't find many functions of TypeChecker in public. They exist, they do exactly what I need, but I can't use them because they are not public. e.g function isArrayLikeType(type: Type): boolean in checker.ts. Many very useful functions are internal functions of createTypeChecker. And nobody can use them. What should I do to check if a Type is ArrayLike or not?
This question is not only about isArrayLikeType function. There are many useful functions that nobody can use except TypeChecker itself. Same issue in program.ts.
Code is splitted to many small functions and you can't just copy-paste some code, because many of this functions uses other private functions.

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

      0