JS: Some more improvements to d.ts file analysis#9457
Merged
asgerf merged 8 commits intogithub:mainfrom Jun 20, 2022
Merged
Conversation
f09eac8 to
d36e619
Compare
7815c49 to
437391b
Compare
erik-krogh
reviewed
Jun 17, 2022
Contributor
erik-krogh
left a comment
There was a problem hiding this comment.
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()); |
| /** | ||
| * Gets the `types` or `typings` field of this package. | ||
| */ | ||
| string getTypings() { result = this.getPropStringValue(["types", "typings"]) } |
Contributor
There was a problem hiding this comment.
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).
Contributor
Author
There was a problem hiding this comment.
The new exports/imports fields are too complex to handle in this PR
erik-krogh
approved these changes
Jun 20, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some more improvements needed for model generation, mainly by improving analysis of
.d.tsfiles.Evaluation looks OK