-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(50750): Object type literal with string literal property in conte…
…xtual typing position causes language service error on all literal type references (#50757) * fix(50750): skip unbound symbols from JSDoc tags in typescript * skip contextual type checking in JsDoc for TypeScript files
- Loading branch information
1 parent
5cd49f6
commit 7dcf11f
Showing
5 changed files
with
93 additions
and
0 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
52 changes: 52 additions & 0 deletions
52
tests/baselines/reference/findAllRefsForStringLiteral.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,52 @@ | ||
// === /a.ts === | ||
// interface Foo { | ||
// property: /*FIND ALL REFS*/"[|foo|]"; | ||
// } | ||
// /** | ||
// * @type {{ property: "foo"}} | ||
// */ | ||
// const obj: Foo = { | ||
// property: "[|foo|]", | ||
// } | ||
|
||
[ | ||
{ | ||
"definition": { | ||
"containerKind": "", | ||
"containerName": "", | ||
"fileName": "/a.ts", | ||
"kind": "var", | ||
"name": "foo", | ||
"textSpan": { | ||
"start": 31, | ||
"length": 3 | ||
}, | ||
"displayParts": [ | ||
{ | ||
"text": "\"foo\"", | ||
"kind": "stringLiteral" | ||
} | ||
] | ||
}, | ||
"references": [ | ||
{ | ||
"textSpan": { | ||
"start": 31, | ||
"length": 3 | ||
}, | ||
"fileName": "/a.ts", | ||
"isWriteAccess": false, | ||
"isInString": true | ||
}, | ||
{ | ||
"textSpan": { | ||
"start": 111, | ||
"length": 3 | ||
}, | ||
"fileName": "/a.ts", | ||
"isWriteAccess": false, | ||
"isInString": true | ||
} | ||
] | ||
} | ||
] |
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,11 @@ | ||
/*====== /a.ts ======*/ | ||
|
||
interface Foo { | ||
property: "RENAME"; | ||
} | ||
/** | ||
* @type {{ property: "foo"}} | ||
*/ | ||
const obj: Foo = { | ||
property: "RENAME", | ||
} |
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,14 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @filename: /a.ts | ||
////interface Foo { | ||
//// property: /**/"foo"; | ||
////} | ||
/////** | ||
//// * @type {{ property: "foo"}} | ||
//// */ | ||
////const obj: Foo = { | ||
//// property: "foo", | ||
////} | ||
|
||
verify.baselineFindAllReferences(""); |
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,14 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @filename: /a.ts | ||
////interface Foo { | ||
//// property: /**/"foo"; | ||
////} | ||
/////** | ||
//// * @type {{ property: "foo"}} | ||
//// */ | ||
////const obj: Foo = { | ||
//// property: "foo", | ||
////} | ||
|
||
verify.baselineRename("", {}); |