TypeScript/tests/baselines/reference/findAllRefsImportEqualsJsonFile.baseline.jsonc
Nathan Shively-Sanders 15722e6b64
Remove referenceGroups/noReferences from fourslash (#45988)
* Remove referenceGroups/noReferences from fourslash

I left most singleReferenceGroups because there were so many, and my current
PR doesn't affect many of them.

* update fourslash/server too

* Explicitly sort keys

Needed for node 10 compatibility

* Revert "Explicitly sort keys"

This reverts commit 1d1c58a4e3.
It shouldn't be needed now that we're not testing with node 10
2021-09-21 16:25:52 -07:00

461 lines
8.3 KiB
Plaintext

// === /a.ts ===
// import /*FIND ALL REFS*/[|j|] = require("./j.json");
// [|j|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/a.ts",
"kind": "alias",
"name": "import j = require(\"./j.json\")",
"textSpan": {
"start": 7,
"length": 1
},
"displayParts": [
{
"text": "import",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "j",
"kind": "aliasName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=",
"kind": "operator"
},
{
"text": " ",
"kind": "space"
},
{
"text": "require",
"kind": "keyword"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "\"./j.json\"",
"kind": "stringLiteral"
},
{
"text": ")",
"kind": "punctuation"
}
],
"contextSpan": {
"start": 0,
"length": 31
}
},
"references": [
{
"textSpan": {
"start": 7,
"length": 1
},
"fileName": "/a.ts",
"contextSpan": {
"start": 0,
"length": 31
},
"isWriteAccess": true,
"isDefinition": true
},
{
"textSpan": {
"start": 32,
"length": 1
},
"fileName": "/a.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /a.ts ===
// import [|j|] = require("./j.json");
// /*FIND ALL REFS*/[|j|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/a.ts",
"kind": "alias",
"name": "import j = require(\"./j.json\")",
"textSpan": {
"start": 7,
"length": 1
},
"displayParts": [
{
"text": "import",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "j",
"kind": "aliasName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=",
"kind": "operator"
},
{
"text": " ",
"kind": "space"
},
{
"text": "require",
"kind": "keyword"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "\"./j.json\"",
"kind": "stringLiteral"
},
{
"text": ")",
"kind": "punctuation"
}
],
"contextSpan": {
"start": 0,
"length": 31
}
},
"references": [
{
"textSpan": {
"start": 7,
"length": 1
},
"fileName": "/a.ts",
"contextSpan": {
"start": 0,
"length": 31
},
"isWriteAccess": true,
"isDefinition": true
},
{
"textSpan": {
"start": 32,
"length": 1
},
"fileName": "/a.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /j.json ===
// [|{ "x": 0 }|]
// === /b.js ===
// const j = require("[|./j.json|]");
// j;
// === /a.ts ===
// import j = require("/*FIND ALL REFS*/[|./j.json|]");
// j;
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/j.json",
"kind": "module",
"name": "module \"/j\"",
"textSpan": {
"start": 0,
"length": 10
},
"displayParts": [
{
"text": "module",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "\"/j\"",
"kind": "moduleName"
}
]
},
"references": [
{
"textSpan": {
"start": 20,
"length": 8
},
"fileName": "/a.ts",
"contextSpan": {
"start": 0,
"length": 31
},
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 19,
"length": 8
},
"fileName": "/b.js",
"contextSpan": {
"start": 0,
"length": 30
},
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 0,
"length": 10
},
"fileName": "/j.json",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /j.json ===
// [|{ "x": 0 }|]
// === /b.js ===
// const j = require("/*FIND ALL REFS*/[|./j.json|]");
// j;
// === /a.ts ===
// import j = require("[|./j.json|]");
// j;
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/j.json",
"kind": "module",
"name": "module \"/j\"",
"textSpan": {
"start": 0,
"length": 10
},
"displayParts": [
{
"text": "module",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "\"/j\"",
"kind": "moduleName"
}
]
},
"references": [
{
"textSpan": {
"start": 20,
"length": 8
},
"fileName": "/a.ts",
"contextSpan": {
"start": 0,
"length": 31
},
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 19,
"length": 8
},
"fileName": "/b.js",
"contextSpan": {
"start": 0,
"length": 30
},
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 0,
"length": 10
},
"fileName": "/j.json",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /b.js ===
// const /*FIND ALL REFS*/[|j|] = require("./j.json");
// [|j|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/b.js",
"kind": "alias",
"name": "import j",
"textSpan": {
"start": 6,
"length": 1
},
"displayParts": [
{
"text": "import",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "j",
"kind": "aliasName"
}
],
"contextSpan": {
"start": 0,
"length": 30
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 1
},
"fileName": "/b.js",
"contextSpan": {
"start": 0,
"length": 30
},
"isWriteAccess": true,
"isDefinition": true
},
{
"textSpan": {
"start": 31,
"length": 1
},
"fileName": "/b.js",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /b.js ===
// const [|j|] = require("./j.json");
// /*FIND ALL REFS*/[|j|];
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/b.js",
"kind": "alias",
"name": "import j",
"textSpan": {
"start": 6,
"length": 1
},
"displayParts": [
{
"text": "import",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "j",
"kind": "aliasName"
}
],
"contextSpan": {
"start": 0,
"length": 30
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 1
},
"fileName": "/b.js",
"contextSpan": {
"start": 0,
"length": 30
},
"isWriteAccess": true,
"isDefinition": true
},
{
"textSpan": {
"start": 31,
"length": 1
},
"fileName": "/b.js",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
undefined