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

276 lines
5.3 KiB
Plaintext
Raw Permalink Normal View History

// === /tests/cases/fourslash/f.ts ===
// export { [|foo|] as [|foo|] }
// function /*FIND ALL REFS*/[|foo|](a: number, b: number) { }
// === /tests/cases/fourslash/b.ts ===
// import x = require("./f");
// x.[|foo|](1, 2);
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/f.ts",
"kind": "function",
"name": "function foo(a: number, b: number): void",
"textSpan": {
"start": 31,
"length": 3
},
"displayParts": [
{
"text": "function",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "foo",
"kind": "functionName"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "a",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
},
{
"text": ",",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "b",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "void",
"kind": "keyword"
}
],
"contextSpan": {
"start": 22,
"length": 38
}
},
"references": [
{
"textSpan": {
"start": 9,
"length": 3
},
"fileName": "/tests/cases/fourslash/f.ts",
"contextSpan": {
"start": 0,
"length": 21
},
"isWriteAccess": false,
"isDefinition": false
},
{
"textSpan": {
"start": 31,
"length": 3
},
"fileName": "/tests/cases/fourslash/f.ts",
"contextSpan": {
"start": 22,
"length": 38
},
"isWriteAccess": true,
"isDefinition": true
}
]
},
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/f.ts",
"kind": "alias",
"name": "(alias) function foo(a: number, b: number): void\nexport foo",
"textSpan": {
"start": 16,
"length": 3
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "alias",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "function",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "foo",
"kind": "aliasName"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "a",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
},
{
"text": ",",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "b",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "void",
"kind": "keyword"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "export",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "foo",
"kind": "aliasName"
}
],
"contextSpan": {
"start": 0,
"length": 21
}
},
"references": [
{
"textSpan": {
"start": 16,
"length": 3
},
"fileName": "/tests/cases/fourslash/f.ts",
"contextSpan": {
"start": 0,
"length": 21
},
"isWriteAccess": true,
"isDefinition": false
},
{
"textSpan": {
"start": 29,
"length": 3
},
"fileName": "/tests/cases/fourslash/b.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]