-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Compiler API: Expose More from typescript.d.ts #23719
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
Comments
There's a package that provides declarations even for the internal stuff: https://www.npmjs.com/package/byots Regarding |
I do not think we want to expose
|
@mhegazy So instead of I'll have to dig more into why I needed |
correct. |
Is there any reliable way to find all symbols available in module scope without using |
@granmoe, take a look at |
I second |
TypeScript Version: 2.9.0-dev.20180426
While Traversing the TypeScript AST of a source file, there have been a number of helpful things I've found by extending
ts.*
fromtypescript.d.ts
and I would like it if these could be exposed (or not marked/* @internal */
).Search Terms:
typescript.d.ts
Node.locals
Symbol.parent
getContainingFunction
isAssignmentTarget
Code
Note:
readonly
forNode#locals
&Symbol#parent
Symbol#parent
, the goal is: given the symbol for a method (e.g.,methodSymbol
forNumber#toString
) find where that method is defined (e.g.,Number
)... maybeprogram.getTypeChecker().getSymbolAtLocation(methodSymbol.valueDeclaration.parent)
is what is "supposed" to be used instead?ts.getContainingFunction()
it seems more appropriate to have a return type ofSignatureDeclaration | undefined
instead ofSignatureDeclaration
Related Issues:
#15841
The text was updated successfully, but these errors were encountered: