TypeScript/tests/baselines/reference/referencesForExpressionKeywords.baseline.jsonc
Nathan Shively-Sanders f0fe1b88ca
Make isDefinition aware of declaring symbol (#45920)
* Make isDefinition aware of target symbol

Initial code, haven't fixed any tests yet.

* Update baselines

This commit includes a regression for commonjs aliases:

```js
// @filename: a.js
function f() { }
module.exports.f = f

// @filename: b.js
const { f } = require('./a')
f/**/
```

Now says that `f` in b.js has 1 reference --
the alias `module.exports.f = f`. This is not correct (or not exactly
correct), but correctly fixing will involve re-creating the ad-hoc
commonjs alias resolution code from the checker. I don't think it's
worth it for an edge case like this.

* update more unit tests

* Fix symbol lookup for constructors

* More baselines + two fixes

1. Fix `default` support.
2. Add a secondary declaration location for commonjs assignment
declarations.

* Update rest of baselines

* Switch a few more tests over to baselines
2021-09-22 13:43:52 -07:00

1269 lines
29 KiB
Plaintext

// === /tests/cases/fourslash/referencesForExpressionKeywords.ts ===
// class [|C|] {
// static x = 1;
// }
// /*FIND ALL REFS*/new [|C|]();
// void [|C|];
// typeof [|C|];
// delete [|C|].x;
// async function* f() {
// yield [|C|];
// await [|C|];
// }
// "x" in [|C|];
// undefined instanceof [|C|];
// undefined as [|C|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"kind": "class",
"name": "class C",
"textSpan": {
"start": 6,
"length": 1
},
"displayParts": [
{
"text": "class",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "C",
"kind": "className"
}
],
"contextSpan": {
"start": 0,
"length": 29
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"contextSpan": {
"start": 0,
"length": 29
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 34,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 44,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 54,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 64,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 101,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 114,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 126,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 150,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 166,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /tests/cases/fourslash/referencesForExpressionKeywords.ts ===
// class [|C|] {
// static x = 1;
// }
// new [|C|]();
// /*FIND ALL REFS*/void [|C|];
// typeof [|C|];
// delete [|C|].x;
// async function* f() {
// yield [|C|];
// await [|C|];
// }
// "x" in [|C|];
// undefined instanceof [|C|];
// undefined as [|C|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"kind": "class",
"name": "class C",
"textSpan": {
"start": 6,
"length": 1
},
"displayParts": [
{
"text": "class",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "C",
"kind": "className"
}
],
"contextSpan": {
"start": 0,
"length": 29
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"contextSpan": {
"start": 0,
"length": 29
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 34,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 44,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 54,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 64,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 101,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 114,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 126,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 150,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 166,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /tests/cases/fourslash/referencesForExpressionKeywords.ts ===
// class [|C|] {
// static x = 1;
// }
// new [|C|]();
// void [|C|];
// /*FIND ALL REFS*/typeof [|C|];
// delete [|C|].x;
// async function* f() {
// yield [|C|];
// await [|C|];
// }
// "x" in [|C|];
// undefined instanceof [|C|];
// undefined as [|C|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"kind": "class",
"name": "class C",
"textSpan": {
"start": 6,
"length": 1
},
"displayParts": [
{
"text": "class",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "C",
"kind": "className"
}
],
"contextSpan": {
"start": 0,
"length": 29
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"contextSpan": {
"start": 0,
"length": 29
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 34,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 44,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 54,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 64,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 101,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 114,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 126,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 150,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 166,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /tests/cases/fourslash/referencesForExpressionKeywords.ts ===
// class [|C|] {
// static x = 1;
// }
// new [|C|]();
// void [|C|];
// typeof [|C|];
// delete [|C|].x;
// async function* f() {
// /*FIND ALL REFS*/yield [|C|];
// await [|C|];
// }
// "x" in [|C|];
// undefined instanceof [|C|];
// undefined as [|C|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"kind": "class",
"name": "class C",
"textSpan": {
"start": 6,
"length": 1
},
"displayParts": [
{
"text": "class",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "C",
"kind": "className"
}
],
"contextSpan": {
"start": 0,
"length": 29
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"contextSpan": {
"start": 0,
"length": 29
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 34,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 44,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 54,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 64,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 101,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 114,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 126,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 150,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 166,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /tests/cases/fourslash/referencesForExpressionKeywords.ts ===
// class [|C|] {
// static x = 1;
// }
// new [|C|]();
// void [|C|];
// typeof [|C|];
// delete [|C|].x;
// async function* f() {
// yield [|C|];
// /*FIND ALL REFS*/await [|C|];
// }
// "x" in [|C|];
// undefined instanceof [|C|];
// undefined as [|C|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"kind": "class",
"name": "class C",
"textSpan": {
"start": 6,
"length": 1
},
"displayParts": [
{
"text": "class",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "C",
"kind": "className"
}
],
"contextSpan": {
"start": 0,
"length": 29
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"contextSpan": {
"start": 0,
"length": 29
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 34,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 44,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 54,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 64,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 101,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 114,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 126,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 150,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 166,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /tests/cases/fourslash/referencesForExpressionKeywords.ts ===
// class [|C|] {
// static x = 1;
// }
// new [|C|]();
// void [|C|];
// typeof [|C|];
// delete [|C|].x;
// async function* f() {
// yield [|C|];
// await [|C|];
// }
// "x" /*FIND ALL REFS*/in [|C|];
// undefined instanceof [|C|];
// undefined as [|C|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"kind": "class",
"name": "class C",
"textSpan": {
"start": 6,
"length": 1
},
"displayParts": [
{
"text": "class",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "C",
"kind": "className"
}
],
"contextSpan": {
"start": 0,
"length": 29
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"contextSpan": {
"start": 0,
"length": 29
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 34,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 44,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 54,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 64,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 101,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 114,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 126,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 150,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 166,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /tests/cases/fourslash/referencesForExpressionKeywords.ts ===
// class [|C|] {
// static x = 1;
// }
// new [|C|]();
// void [|C|];
// typeof [|C|];
// delete [|C|].x;
// async function* f() {
// yield [|C|];
// await [|C|];
// }
// "x" in [|C|];
// undefined /*FIND ALL REFS*/instanceof [|C|];
// undefined as [|C|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"kind": "class",
"name": "class C",
"textSpan": {
"start": 6,
"length": 1
},
"displayParts": [
{
"text": "class",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "C",
"kind": "className"
}
],
"contextSpan": {
"start": 0,
"length": 29
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"contextSpan": {
"start": 0,
"length": 29
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 34,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 44,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 54,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 64,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 101,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 114,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 126,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 150,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 166,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /tests/cases/fourslash/referencesForExpressionKeywords.ts ===
// class [|C|] {
// static x = 1;
// }
// new [|C|]();
// void [|C|];
// typeof [|C|];
// delete [|C|].x;
// async function* f() {
// yield [|C|];
// await [|C|];
// }
// "x" in [|C|];
// undefined instanceof [|C|];
// undefined /*FIND ALL REFS*/as [|C|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"kind": "class",
"name": "class C",
"textSpan": {
"start": 6,
"length": 1
},
"displayParts": [
{
"text": "class",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "C",
"kind": "className"
}
],
"contextSpan": {
"start": 0,
"length": 29
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"contextSpan": {
"start": 0,
"length": 29
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 34,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 44,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 54,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 64,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 101,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 114,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 126,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 150,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 166,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /tests/cases/fourslash/referencesForExpressionKeywords.ts ===
// class C {
// static [|x|] = 1;
// }
// new C();
// void C;
// typeof C;
// /*FIND ALL REFS*/delete C.[|x|];
// async function* f() {
// yield C;
// await C;
// }
// "x" in C;
// undefined instanceof C;
// undefined as C;
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"kind": "property",
"name": "(property) C.x: number",
"textSpan": {
"start": 21,
"length": 1
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "property",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "C",
"kind": "className"
},
{
"text": ".",
"kind": "punctuation"
},
{
"text": "x",
"kind": "propertyName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
}
],
"contextSpan": {
"start": 14,
"length": 13
}
},
"references": [
{
"textSpan": {
"start": 21,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"contextSpan": {
"start": 14,
"length": 13
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 66,
"length": 1
},
"fileName": "/tests/cases/fourslash/referencesForExpressionKeywords.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]