TypeScript/tests/baselines/reference/findAllRefsForDefaultExport_reExport.baseline.jsonc

1055 lines
20 KiB
Plaintext
Raw Permalink Normal View History

// === /export.ts ===
// const /*FIND ALL REFS*/[|foo|] = 1;
// export default [|foo|];
// === /re-export-dep.ts ===
// import [|fooDefault|] from "./re-export";
// === /re-export.ts ===
// export { [|default|] } from "./export";
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/export.ts",
"kind": "const",
"name": "const foo: 1",
"textSpan": {
"start": 6,
"length": 3
},
"displayParts": [
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "foo",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
}
],
"contextSpan": {
"start": 0,
"length": 14
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 3
},
"fileName": "/export.ts",
"contextSpan": {
"start": 0,
"length": 14
},
"isWriteAccess": true,
"isDefinition": true
},
{
"textSpan": {
"start": 30,
"length": 3
},
"fileName": "/export.ts",
"contextSpan": {
"start": 15,
"length": 19
},
"isWriteAccess": false,
"isDefinition": false
}
]
},
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/re-export.ts",
"kind": "alias",
"name": "(alias) const foo: 1\nexport default",
"textSpan": {
"start": 9,
"length": 7
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "alias",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "foo",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "export",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "default",
"kind": "aliasName"
}
],
"contextSpan": {
"start": 0,
"length": 35
}
},
"references": [
{
"textSpan": {
"start": 9,
"length": 7
},
"fileName": "/re-export.ts",
"contextSpan": {
"start": 0,
"length": 35
},
"isWriteAccess": true,
"isDefinition": false
}
]
},
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/re-export-dep.ts",
"kind": "alias",
"name": "(alias) const fooDefault: 1\nimport fooDefault",
"textSpan": {
"start": 7,
"length": 10
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "alias",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "fooDefault",
"kind": "aliasName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "import",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "fooDefault",
"kind": "aliasName"
}
],
"contextSpan": {
"start": 0,
"length": 37
}
},
"references": [
{
"textSpan": {
"start": 7,
"length": 10
},
"fileName": "/re-export-dep.ts",
"contextSpan": {
"start": 0,
"length": 37
},
"isWriteAccess": true,
"isDefinition": false
}
]
}
]
// === /export.ts ===
// const [|foo|] = 1;
// export default /*FIND ALL REFS*/[|foo|];
// === /re-export-dep.ts ===
// import [|fooDefault|] from "./re-export";
// === /re-export.ts ===
// export { [|default|] } from "./export";
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/export.ts",
"kind": "const",
"name": "const foo: 1",
"textSpan": {
"start": 6,
"length": 3
},
"displayParts": [
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "foo",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
}
],
"contextSpan": {
"start": 0,
"length": 14
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 3
},
"fileName": "/export.ts",
"contextSpan": {
"start": 0,
"length": 14
},
"isWriteAccess": true,
"isDefinition": true
},
{
"textSpan": {
"start": 30,
"length": 3
},
"fileName": "/export.ts",
"contextSpan": {
"start": 15,
"length": 19
},
"isWriteAccess": false,
"isDefinition": false
}
]
},
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/re-export.ts",
"kind": "alias",
"name": "(alias) const foo: 1\nexport default",
"textSpan": {
"start": 9,
"length": 7
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "alias",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "foo",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "export",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "default",
"kind": "aliasName"
}
],
"contextSpan": {
"start": 0,
"length": 35
}
},
"references": [
{
"textSpan": {
"start": 9,
"length": 7
},
"fileName": "/re-export.ts",
"contextSpan": {
"start": 0,
"length": 35
},
"isWriteAccess": true,
"isDefinition": false
}
]
},
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/re-export-dep.ts",
"kind": "alias",
"name": "(alias) const fooDefault: 1\nimport fooDefault",
"textSpan": {
"start": 7,
"length": 10
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "alias",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "fooDefault",
"kind": "aliasName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "import",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "fooDefault",
"kind": "aliasName"
}
],
"contextSpan": {
"start": 0,
"length": 37
}
},
"references": [
{
"textSpan": {
"start": 7,
"length": 10
},
"fileName": "/re-export-dep.ts",
"contextSpan": {
"start": 0,
"length": 37
},
"isWriteAccess": true,
"isDefinition": false
}
]
}
]
// === /export.ts ===
// const [|foo|] = 1;
// export default [|foo|];
// === /re-export-dep.ts ===
// import [|fooDefault|] from "./re-export";
// === /re-export.ts ===
// export { /*FIND ALL REFS*/[|default|] } from "./export";
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/re-export.ts",
"kind": "alias",
"name": "(alias) const foo: 1\nexport default",
"textSpan": {
"start": 9,
"length": 7
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "alias",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "foo",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "export",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "default",
"kind": "aliasName"
}
],
"contextSpan": {
"start": 0,
"length": 35
}
},
"references": [
{
"textSpan": {
"start": 9,
"length": 7
},
"fileName": "/re-export.ts",
"contextSpan": {
"start": 0,
"length": 35
},
"isWriteAccess": true,
"isDefinition": true
}
]
},
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/re-export-dep.ts",
"kind": "alias",
"name": "(alias) const fooDefault: 1\nimport fooDefault",
"textSpan": {
"start": 7,
"length": 10
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "alias",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "fooDefault",
"kind": "aliasName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "import",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "fooDefault",
"kind": "aliasName"
}
],
"contextSpan": {
"start": 0,
"length": 37
}
},
"references": [
{
"textSpan": {
"start": 7,
"length": 10
},
"fileName": "/re-export-dep.ts",
"contextSpan": {
"start": 0,
"length": 37
},
"isWriteAccess": true,
"isDefinition": false
}
]
},
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/export.ts",
"kind": "const",
"name": "const foo: 1",
"textSpan": {
"start": 6,
"length": 3
},
"displayParts": [
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "foo",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
}
],
"contextSpan": {
"start": 0,
"length": 14
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 3
},
"fileName": "/export.ts",
"contextSpan": {
"start": 0,
"length": 14
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 30,
"length": 3
},
"fileName": "/export.ts",
"contextSpan": {
"start": 15,
"length": 19
},
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /export.ts ===
// const [|foo|] = 1;
// export default [|foo|];
// === /re-export-dep.ts ===
// import /*FIND ALL REFS*/[|fooDefault|] from "./re-export";
// === /re-export.ts ===
// export { [|default|] } from "./export";
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/re-export-dep.ts",
"kind": "alias",
"name": "(alias) const fooDefault: 1\nimport fooDefault",
"textSpan": {
"start": 7,
"length": 10
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "alias",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "fooDefault",
"kind": "aliasName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "import",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "fooDefault",
"kind": "aliasName"
}
],
"contextSpan": {
"start": 0,
"length": 37
}
},
"references": [
{
"textSpan": {
"start": 7,
"length": 10
},
"fileName": "/re-export-dep.ts",
"contextSpan": {
"start": 0,
"length": 37
},
"isWriteAccess": true,
"isDefinition": true
}
]
},
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/re-export.ts",
"kind": "alias",
"name": "(alias) const foo: 1\nexport default",
"textSpan": {
"start": 9,
"length": 7
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "alias",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "foo",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "export",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "default",
"kind": "aliasName"
}
],
"contextSpan": {
"start": 0,
"length": 35
}
},
"references": [
{
"textSpan": {
"start": 9,
"length": 7
},
"fileName": "/re-export.ts",
"contextSpan": {
"start": 0,
"length": 35
},
"isWriteAccess": true,
"isDefinition": false
}
]
},
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/export.ts",
"kind": "const",
"name": "const foo: 1",
"textSpan": {
"start": 6,
"length": 3
},
"displayParts": [
{
"text": "const",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "foo",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "1",
"kind": "stringLiteral"
}
],
"contextSpan": {
"start": 0,
"length": 14
}
},
"references": [
{
"textSpan": {
"start": 6,
"length": 3
},
"fileName": "/export.ts",
"contextSpan": {
"start": 0,
"length": 14
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 30,
"length": 3
},
"fileName": "/export.ts",
"contextSpan": {
"start": 15,
"length": 19
},
"isWriteAccess": false,
"isDefinition": false
}
]
}
]