-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose more functions of compiler api to public (from TypeChecker and Program) #17680
Comments
Can't agree more on this. As an example I'm in need of https://github.com/Microsoft/TypeScript/blob/37b20ee670e9a89307b0e69960a2cbce104f93e5/src/compiler/utilities.ts#L322 |
Same pattern in https://github.com/Microsoft/TypeScript/blob/ceae613e4c0ba36829a2381687883ecdc6b169c3/src/services/services.ts#L1056 |
it is a style the TS team has picked to stay true to JS development experience. classes are becoming more mainstream now, but I do not think we will be breaking the API any time soon. |
OP seems to be covered by #9879 |
@deamme |
@mhegazy It is! Thank you 😄 |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
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.
The text was updated successfully, but these errors were encountered: