-
Notifications
You must be signed in to change notification settings - Fork 1.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
JS: Some more improvements to d.ts file analysis #9457
Conversation
f09eac8
to
d36e619
Compare
7815c49
to
437391b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very quick first look.
Seems reasonable, but two comments.
return new ExternalModuleDeclaration(loc, (Literal) nameNode, body); | ||
ExternalModuleDeclaration decl = new ExternalModuleDeclaration(loc, (Literal) nameNode, body); | ||
attachSymbolInformation(decl, node); | ||
System.out.println("ExternalModuleDeclaration symbol = " + decl.getSymbol()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug print? Remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦
/** | ||
* Gets the `types` or `typings` field of this package. | ||
*/ | ||
string getTypings() { result = this.getPropStringValue(["types", "typings"]) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also the "types
" field under "exports"
: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-rc/#package-json-exports-imports-and-self-referencing
(Might not be that relevant, so you can probably skip it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new exports
/imports
fields are too complex to handle in this PR
Some more improvements needed for model generation, mainly by improving analysis of
.d.ts
files.Evaluation looks OK