forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
also return classes when caling goToDef on a constructor call (micros…
- Loading branch information
Showing
9 changed files
with
601 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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 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
100 changes: 100 additions & 0 deletions
100
tests/baselines/reference/goToDefinitionClassConstructors.baseline.jsonc
This file contains 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,100 @@ | ||
// === goToDefinition === | ||
// === /tests/cases/fourslash/main.ts === | ||
// <|import { [|Derived|] } from './base'|> | ||
// const derived = new /*GOTO DEF*/Derived(cArg) | ||
|
||
// === Details === | ||
[ | ||
{ | ||
"kind": "alias", | ||
"name": "Derived", | ||
"containerName": "", | ||
"isLocal": true, | ||
"isAmbient": false, | ||
"unverified": false, | ||
"failedAliasResolution": true | ||
} | ||
] | ||
|
||
|
||
|
||
// === goToDefinition === | ||
// === /tests/cases/fourslash/defInSameFile.ts === | ||
// import { Base } from './base' | ||
// <|class [|SameFile|] extends Base { | ||
// readonly name: string = 'SameFile' | ||
// }|> | ||
// const SameFile = new /*GOTO DEF*/SameFile(cArg) | ||
// const wrapper = new Base(cArg) | ||
|
||
// === Details === | ||
[ | ||
{ | ||
"kind": "class", | ||
"name": "SameFile", | ||
"containerName": "", | ||
"isLocal": true, | ||
"isAmbient": false, | ||
"unverified": false, | ||
"failedAliasResolution": false | ||
} | ||
] | ||
|
||
|
||
|
||
// === goToDefinition === | ||
// === /tests/cases/fourslash/hasConstructor.ts === | ||
// import { Base } from './base' | ||
// <|class [|{| defId: 0 |}HasConstructor|] extends Base { | ||
// [|{| defId: 1 |}constructor() {}|] | ||
// readonly name: string = ''; | ||
// }|> | ||
// const hasConstructor = new /*GOTO DEF*/HasConstructor(cArg) | ||
|
||
// === Details === | ||
[ | ||
{ | ||
"defId": 0, | ||
"kind": "class", | ||
"name": "HasConstructor", | ||
"containerName": "", | ||
"isLocal": true, | ||
"isAmbient": false, | ||
"unverified": false, | ||
"failedAliasResolution": false | ||
}, | ||
{ | ||
"defId": 1, | ||
"kind": "constructor", | ||
"name": "__constructor", | ||
"containerName": "HasConstructor", | ||
"isLocal": true, | ||
"isAmbient": false, | ||
"unverified": false, | ||
"failedAliasResolution": false | ||
} | ||
] | ||
|
||
|
||
|
||
// === goToDefinition === | ||
// === /tests/cases/fourslash/defInSameFile.ts === | ||
// <|import { [|Base|] } from './base'|> | ||
// class SameFile extends Base { | ||
// readonly name: string = 'SameFile' | ||
// } | ||
// const SameFile = new SameFile(cArg) | ||
// const wrapper = new /*GOTO DEF*/Base(cArg) | ||
|
||
// === Details === | ||
[ | ||
{ | ||
"kind": "alias", | ||
"name": "Base", | ||
"containerName": "", | ||
"isLocal": true, | ||
"isAmbient": false, | ||
"unverified": false, | ||
"failedAliasResolution": true | ||
} | ||
] |
Oops, something went wrong.