-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Jsdoc values as namespaces #20198
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
Merged
Merged
Jsdoc values as namespaces #20198
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
d2c0ec7
JS:resolve nested static classes+on func/class exps
sandersn b1c735f
Test:Type references to nested JS classes
sandersn 418274e
Merge branch 'master' into jsdoc-values-as-namespaces
sandersn 1d1a7d8
Update chrome-devtools baseline
sandersn 082802e
JS:Treat type-annotated uninitialised vars as declarations
sandersn fa96bd4
More tests and update baselines
sandersn 2f0e581
JS Property assignments create namespaces (hacky)
sandersn d4f6c8c
Merge branch 'js-ctor-props-type-annotation-as-declaration' into jsdo…
sandersn bee7d06
Binder-based prop-assignment decls: messy version
sandersn ee5f91c
Update baselines
sandersn 9b8b750
Always put assignments in locals.
sandersn 4199038
Fix type-annotation declaration in JS files
sandersn d338ecd
Tests:more JS static property assignments
sandersn 3a74147
Add empty 'module' declarations for chrome-devtools
sandersn 5024aa6
Update chrome-devtools baseline
sandersn 33f3e49
Update chrome dev tools definitions
sandersn 74faa3d
JS static properties:fix multi-file references+merging
sandersn e441dd0
Binder:clean up bindPropertyAssignment and friends
sandersn 61fe04b
Merge branch 'master' into jsdoc-values-as-namespaces
sandersn 341e702
JS static prop assignments don't need same type
sandersn 78a0b94
Update chrome devtools baseline
sandersn 098a052
Remove temporary error-avoidance hack
sandersn 665c2ec
Add SymbolFlag for containers of JS special decls
sandersn 69bbfed
Merge branch 'master' into jsdoc-values-as-namespaces
sandersn 0e4537e
Update baselines with new SymbolFlags
sandersn 7208204
Don't mutate symbol flags after creation
sandersn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
41 changes: 41 additions & 0 deletions
41
tests/baselines/reference/typeFromPropertyAssignment.symbols
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| === tests/cases/conformance/salsa/a.js === | ||
| var Outer = class O { | ||
| >Outer : Symbol(Outer, Decl(a.js, 0, 3), Decl(a.js, 2, 1)) | ||
| >O : Symbol(O, Decl(a.js, 0, 11)) | ||
|
|
||
| m(x, y) { } | ||
| >m : Symbol(O.m, Decl(a.js, 0, 21)) | ||
| >x : Symbol(x, Decl(a.js, 1, 6)) | ||
| >y : Symbol(y, Decl(a.js, 1, 8)) | ||
| } | ||
| Outer.Inner = class I { | ||
| >Outer.Inner : Symbol(O.Inner, Decl(a.js, 2, 1)) | ||
| >Outer : Symbol(Outer, Decl(a.js, 0, 3), Decl(a.js, 2, 1)) | ||
| >Inner : Symbol(O.Inner, Decl(a.js, 2, 1)) | ||
| >I : Symbol(I, Decl(a.js, 3, 13)) | ||
|
|
||
| n(a, b) { } | ||
| >n : Symbol(I.n, Decl(a.js, 3, 23)) | ||
| >a : Symbol(a, Decl(a.js, 4, 6)) | ||
| >b : Symbol(b, Decl(a.js, 4, 8)) | ||
|
|
||
| } | ||
| /** @type {Outer} */ | ||
| var si | ||
| >si : Symbol(si, Decl(a.js, 8, 3)) | ||
|
|
||
| si.m | ||
| >si.m : Symbol(O.m, Decl(a.js, 0, 21)) | ||
| >si : Symbol(si, Decl(a.js, 8, 3)) | ||
| >m : Symbol(O.m, Decl(a.js, 0, 21)) | ||
|
|
||
| /** @type {Outer.Inner} */ | ||
| var oi | ||
| >oi : Symbol(oi, Decl(a.js, 11, 3)) | ||
|
|
||
| oi.n | ||
| >oi.n : Symbol(I.n, Decl(a.js, 3, 23)) | ||
| >oi : Symbol(oi, Decl(a.js, 11, 3)) | ||
| >n : Symbol(I.n, Decl(a.js, 3, 23)) | ||
|
|
||
|
|
44 changes: 44 additions & 0 deletions
44
tests/baselines/reference/typeFromPropertyAssignment.types
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| === tests/cases/conformance/salsa/a.js === | ||
| var Outer = class O { | ||
| >Outer : typeof O | ||
| >class O { m(x, y) { }} : typeof O | ||
| >O : typeof O | ||
|
|
||
| m(x, y) { } | ||
| >m : (x: any, y: any) => void | ||
| >x : any | ||
| >y : any | ||
| } | ||
| Outer.Inner = class I { | ||
| >Outer.Inner = class I { n(a, b) { }} : typeof I | ||
| >Outer.Inner : typeof I | ||
| >Outer : typeof O | ||
| >Inner : typeof I | ||
| >class I { n(a, b) { }} : typeof I | ||
| >I : typeof I | ||
|
|
||
| n(a, b) { } | ||
| >n : (a: any, b: any) => void | ||
| >a : any | ||
| >b : any | ||
|
|
||
| } | ||
| /** @type {Outer} */ | ||
| var si | ||
| >si : O | ||
|
|
||
| si.m | ||
| >si.m : (x: any, y: any) => void | ||
| >si : O | ||
| >m : (x: any, y: any) => void | ||
|
|
||
| /** @type {Outer.Inner} */ | ||
| var oi | ||
| >oi : I | ||
|
|
||
| oi.n | ||
| >oi.n : (a: any, b: any) => void | ||
| >oi : I | ||
| >n : (a: any, b: any) => void | ||
|
|
||
|
|
Oops, something went wrong.
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.
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.
we need to handle these recursivelly as well.. i.e. today we handel:
but we should also handle:
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.
Good idea. I will do that in a follow-up PR. It will require touching even more of the existing code.