459bd19941
* Add unqualified JSDoc member references This allows unqualified references like: ```ts class Zero { /** @param buddy Must be {@link D_HORSE} or {@link D_DOG}. */ deploy(buddy: number) { } static D_HORSE = 1 static D_DOG = 2 } ``` I surveyed @see and @link again to estimate how common this is. I found a little over 200 uses, which is around 2%. Sorted by frequency, this *is* the next feature on the list, along with the `module:` prefix. So I think this is about the right point to stop adding code. In this case, however, I liked most of the uses -- there were a lot of deprecated functions that referenced a function just below, where it would be wordy to qualify the name, but the reader would benefit from a link. Note that unqualified references do *not* work inside type or object literals. The code I ended up with is quite complicated and I didn't observe any uses in the wild. Fixes #43595 * Remove type/object literal container check Since they don't work anyway
1571 lines
32 KiB
Plaintext
1571 lines
32 KiB
Plaintext
// === /tests/cases/fourslash/findAllReferencesLinkTag1.ts ===
|
|
// class C {
|
|
// [|m|]/*FIND ALL REFS*/() { }
|
|
// n = 1
|
|
// static s() { }
|
|
// /**
|
|
// * {@link [|m|]}
|
|
// * @see {[|m|]}
|
|
// * {@link C.[|m|]}
|
|
// * @see {C.[|m|]}
|
|
// * {@link C#[|m|]}
|
|
// * @see {C#[|m|]}
|
|
// * {@link C.prototype.[|m|]}
|
|
// * @see {C.prototype.[|m|]}
|
|
// */
|
|
// p() { }
|
|
// /**
|
|
// * {@link n}
|
|
// * @see {n}
|
|
// * {@link C.n}
|
|
// * @see {C.n}
|
|
// * {@link C#n}
|
|
// * @see {C#n}
|
|
// * {@link C.prototype.n}
|
|
// * @see {C.prototype.n}
|
|
// */
|
|
// q() { }
|
|
// /**
|
|
// * {@link s}
|
|
// * @see {s}
|
|
// * {@link C.s}
|
|
// * @see {C.s}
|
|
// */
|
|
// r() { }
|
|
// }
|
|
//
|
|
// interface I {
|
|
// a()
|
|
// b: 1
|
|
// /**
|
|
// * {@link a}
|
|
// * @see {a}
|
|
// * {@link I.a}
|
|
// * @see {I.a}
|
|
// * {@link I#a}
|
|
// * @see {I#a}
|
|
// */
|
|
// c()
|
|
// /**
|
|
// * {@link b}
|
|
// * @see {b}
|
|
// * {@link I.b}
|
|
// * @see {I.b}
|
|
// */
|
|
// d()
|
|
// }
|
|
//
|
|
// function nestor() {
|
|
// /** {@link r2} */
|
|
// function ref() { }
|
|
// /** @see {r2} */
|
|
// function d3() { }
|
|
// function r2() { }
|
|
// }
|
|
|
|
[
|
|
{
|
|
"definition": {
|
|
"containerKind": "",
|
|
"containerName": "",
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"kind": "method",
|
|
"name": "(method) C.m(): void",
|
|
"textSpan": {
|
|
"start": 14,
|
|
"length": 1
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "C",
|
|
"kind": "className"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "m",
|
|
"kind": "methodName"
|
|
},
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "void",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"contextSpan": {
|
|
"start": 14,
|
|
"length": 7
|
|
}
|
|
},
|
|
"references": [
|
|
{
|
|
"textSpan": {
|
|
"start": 14,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"contextSpan": {
|
|
"start": 14,
|
|
"length": 7
|
|
},
|
|
"isWriteAccess": true,
|
|
"isDefinition": true
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 73,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 89,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 108,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 126,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 145,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 163,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 192,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 220,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
|
|
// === /tests/cases/fourslash/findAllReferencesLinkTag1.ts ===
|
|
// class C {
|
|
// m() { }
|
|
// [|n|]/*FIND ALL REFS*/ = 1
|
|
// static s() { }
|
|
// /**
|
|
// * {@link m}
|
|
// * @see {m}
|
|
// * {@link C.m}
|
|
// * @see {C.m}
|
|
// * {@link C#m}
|
|
// * @see {C#m}
|
|
// * {@link C.prototype.m}
|
|
// * @see {C.prototype.m}
|
|
// */
|
|
// p() { }
|
|
// /**
|
|
// * {@link [|n|]}
|
|
// * @see {[|n|]}
|
|
// * {@link C.[|n|]}
|
|
// * @see {C.[|n|]}
|
|
// * {@link C#[|n|]}
|
|
// * @see {C#[|n|]}
|
|
// * {@link C.prototype.[|n|]}
|
|
// * @see {C.prototype.[|n|]}
|
|
// */
|
|
// q() { }
|
|
// /**
|
|
// * {@link s}
|
|
// * @see {s}
|
|
// * {@link C.s}
|
|
// * @see {C.s}
|
|
// */
|
|
// r() { }
|
|
// }
|
|
//
|
|
// interface I {
|
|
// a()
|
|
// b: 1
|
|
// /**
|
|
// * {@link a}
|
|
// * @see {a}
|
|
// * {@link I.a}
|
|
// * @see {I.a}
|
|
// * {@link I#a}
|
|
// * @see {I#a}
|
|
// */
|
|
// c()
|
|
// /**
|
|
// * {@link b}
|
|
// * @see {b}
|
|
// * {@link I.b}
|
|
// * @see {I.b}
|
|
// */
|
|
// d()
|
|
// }
|
|
//
|
|
// function nestor() {
|
|
// /** {@link r2} */
|
|
// function ref() { }
|
|
// /** @see {r2} */
|
|
// function d3() { }
|
|
// function r2() { }
|
|
// }
|
|
|
|
[
|
|
{
|
|
"definition": {
|
|
"containerKind": "",
|
|
"containerName": "",
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"kind": "property",
|
|
"name": "(property) C.n: number",
|
|
"textSpan": {
|
|
"start": 26,
|
|
"length": 1
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "property",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "C",
|
|
"kind": "className"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "n",
|
|
"kind": "propertyName"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "number",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"contextSpan": {
|
|
"start": 26,
|
|
"length": 5
|
|
}
|
|
},
|
|
"references": [
|
|
{
|
|
"textSpan": {
|
|
"start": 26,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"contextSpan": {
|
|
"start": 26,
|
|
"length": 5
|
|
},
|
|
"isWriteAccess": true,
|
|
"isDefinition": true
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 265,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 281,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 300,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 318,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 337,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 355,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 384,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 412,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
|
|
// === /tests/cases/fourslash/findAllReferencesLinkTag1.ts ===
|
|
// class C {
|
|
// m() { }
|
|
// n = 1
|
|
// static [|s|]/*FIND ALL REFS*/() { }
|
|
// /**
|
|
// * {@link m}
|
|
// * @see {m}
|
|
// * {@link C.m}
|
|
// * @see {C.m}
|
|
// * {@link C#m}
|
|
// * @see {C#m}
|
|
// * {@link C.prototype.m}
|
|
// * @see {C.prototype.m}
|
|
// */
|
|
// p() { }
|
|
// /**
|
|
// * {@link n}
|
|
// * @see {n}
|
|
// * {@link C.n}
|
|
// * @see {C.n}
|
|
// * {@link C#n}
|
|
// * @see {C#n}
|
|
// * {@link C.prototype.n}
|
|
// * @see {C.prototype.n}
|
|
// */
|
|
// q() { }
|
|
// /**
|
|
// * {@link [|s|]}
|
|
// * @see {[|s|]}
|
|
// * {@link C.[|s|]}
|
|
// * @see {C.[|s|]}
|
|
// */
|
|
// r() { }
|
|
// }
|
|
//
|
|
// interface I {
|
|
// a()
|
|
// b: 1
|
|
// /**
|
|
// * {@link a}
|
|
// * @see {a}
|
|
// * {@link I.a}
|
|
// * @see {I.a}
|
|
// * {@link I#a}
|
|
// * @see {I#a}
|
|
// */
|
|
// c()
|
|
// /**
|
|
// * {@link b}
|
|
// * @see {b}
|
|
// * {@link I.b}
|
|
// * @see {I.b}
|
|
// */
|
|
// d()
|
|
// }
|
|
//
|
|
// function nestor() {
|
|
// /** {@link r2} */
|
|
// function ref() { }
|
|
// /** @see {r2} */
|
|
// function d3() { }
|
|
// function r2() { }
|
|
// }
|
|
|
|
[
|
|
{
|
|
"definition": {
|
|
"containerKind": "",
|
|
"containerName": "",
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"kind": "method",
|
|
"name": "(method) C.s(): void",
|
|
"textSpan": {
|
|
"start": 43,
|
|
"length": 1
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "C",
|
|
"kind": "className"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "s",
|
|
"kind": "methodName"
|
|
},
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "void",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"contextSpan": {
|
|
"start": 36,
|
|
"length": 14
|
|
}
|
|
},
|
|
"references": [
|
|
{
|
|
"textSpan": {
|
|
"start": 43,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"contextSpan": {
|
|
"start": 36,
|
|
"length": 14
|
|
},
|
|
"isWriteAccess": true,
|
|
"isDefinition": true
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 457,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 473,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 492,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 510,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
|
|
// === /tests/cases/fourslash/findAllReferencesLinkTag1.ts ===
|
|
// class C {
|
|
// m() { }
|
|
// n = 1
|
|
// static s() { }
|
|
// /**
|
|
// * {@link m}
|
|
// * @see {m}
|
|
// * {@link C.m}
|
|
// * @see {C.m}
|
|
// * {@link C#m}
|
|
// * @see {C#m}
|
|
// * {@link C.prototype.m}
|
|
// * @see {C.prototype.m}
|
|
// */
|
|
// p() { }
|
|
// /**
|
|
// * {@link n}
|
|
// * @see {n}
|
|
// * {@link C.n}
|
|
// * @see {C.n}
|
|
// * {@link C#n}
|
|
// * @see {C#n}
|
|
// * {@link C.prototype.n}
|
|
// * @see {C.prototype.n}
|
|
// */
|
|
// q() { }
|
|
// /**
|
|
// * {@link s}
|
|
// * @see {s}
|
|
// * {@link C.s}
|
|
// * @see {C.s}
|
|
// */
|
|
// r() { }
|
|
// }
|
|
//
|
|
// interface I {
|
|
// [|a|]/*FIND ALL REFS*/()
|
|
// b: 1
|
|
// /**
|
|
// * {@link [|a|]}
|
|
// * @see {[|a|]}
|
|
// * {@link I.[|a|]}
|
|
// * @see {I.[|a|]}
|
|
// * {@link I#[|a|]}
|
|
// * @see {I#[|a|]}
|
|
// */
|
|
// c()
|
|
// /**
|
|
// * {@link b}
|
|
// * @see {b}
|
|
// * {@link I.b}
|
|
// * @see {I.b}
|
|
// */
|
|
// d()
|
|
// }
|
|
//
|
|
// function nestor() {
|
|
// /** {@link r2} */
|
|
// function ref() { }
|
|
// /** @see {r2} */
|
|
// function d3() { }
|
|
// function r2() { }
|
|
// }
|
|
|
|
[
|
|
{
|
|
"definition": {
|
|
"containerKind": "",
|
|
"containerName": "",
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"kind": "method",
|
|
"name": "(method) I.a(): any",
|
|
"textSpan": {
|
|
"start": 554,
|
|
"length": 1
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "I",
|
|
"kind": "interfaceName"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "a",
|
|
"kind": "methodName"
|
|
},
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "any",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"contextSpan": {
|
|
"start": 554,
|
|
"length": 3
|
|
}
|
|
},
|
|
"references": [
|
|
{
|
|
"textSpan": {
|
|
"start": 554,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"contextSpan": {
|
|
"start": 554,
|
|
"length": 3
|
|
},
|
|
"isWriteAccess": false,
|
|
"isDefinition": true
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 589,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 605,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 624,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 642,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 661,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 679,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
|
|
// === /tests/cases/fourslash/findAllReferencesLinkTag1.ts ===
|
|
// class C {
|
|
// m() { }
|
|
// n = 1
|
|
// static s() { }
|
|
// /**
|
|
// * {@link m}
|
|
// * @see {m}
|
|
// * {@link C.m}
|
|
// * @see {C.m}
|
|
// * {@link C#m}
|
|
// * @see {C#m}
|
|
// * {@link C.prototype.m}
|
|
// * @see {C.prototype.m}
|
|
// */
|
|
// p() { }
|
|
// /**
|
|
// * {@link n}
|
|
// * @see {n}
|
|
// * {@link C.n}
|
|
// * @see {C.n}
|
|
// * {@link C#n}
|
|
// * @see {C#n}
|
|
// * {@link C.prototype.n}
|
|
// * @see {C.prototype.n}
|
|
// */
|
|
// q() { }
|
|
// /**
|
|
// * {@link s}
|
|
// * @see {s}
|
|
// * {@link C.s}
|
|
// * @see {C.s}
|
|
// */
|
|
// r() { }
|
|
// }
|
|
//
|
|
// interface I {
|
|
// a()
|
|
// [|b|]/*FIND ALL REFS*/: 1
|
|
// /**
|
|
// * {@link a}
|
|
// * @see {a}
|
|
// * {@link I.a}
|
|
// * @see {I.a}
|
|
// * {@link I#a}
|
|
// * @see {I#a}
|
|
// */
|
|
// c()
|
|
// /**
|
|
// * {@link [|b|]}
|
|
// * @see {[|b|]}
|
|
// * {@link I.[|b|]}
|
|
// * @see {I.[|b|]}
|
|
// */
|
|
// d()
|
|
// }
|
|
//
|
|
// function nestor() {
|
|
// /** {@link r2} */
|
|
// function ref() { }
|
|
// /** @see {r2} */
|
|
// function d3() { }
|
|
// function r2() { }
|
|
// }
|
|
|
|
[
|
|
{
|
|
"definition": {
|
|
"containerKind": "",
|
|
"containerName": "",
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"kind": "property",
|
|
"name": "(property) I.b: 1",
|
|
"textSpan": {
|
|
"start": 562,
|
|
"length": 1
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "property",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "I",
|
|
"kind": "interfaceName"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "b",
|
|
"kind": "propertyName"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "1",
|
|
"kind": "stringLiteral"
|
|
}
|
|
],
|
|
"contextSpan": {
|
|
"start": 562,
|
|
"length": 4
|
|
}
|
|
},
|
|
"references": [
|
|
{
|
|
"textSpan": {
|
|
"start": 562,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"contextSpan": {
|
|
"start": 562,
|
|
"length": 4
|
|
},
|
|
"isWriteAccess": false,
|
|
"isDefinition": true
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 720,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 736,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 755,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 773,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
|
|
// === /tests/cases/fourslash/findAllReferencesLinkTag1.ts ===
|
|
// class C {
|
|
// m() { }
|
|
// n = 1
|
|
// static s() { }
|
|
// /**
|
|
// * {@link m}
|
|
// * @see {m}
|
|
// * {@link C.m}
|
|
// * @see {C.m}
|
|
// * {@link C#m}
|
|
// * @see {C#m}
|
|
// * {@link C.prototype.m}
|
|
// * @see {C.prototype.m}
|
|
// */
|
|
// p() { }
|
|
// /**
|
|
// * {@link n}
|
|
// * @see {n}
|
|
// * {@link C.n}
|
|
// * @see {C.n}
|
|
// * {@link C#n}
|
|
// * @see {C#n}
|
|
// * {@link C.prototype.n}
|
|
// * @see {C.prototype.n}
|
|
// */
|
|
// q() { }
|
|
// /**
|
|
// * {@link s}
|
|
// * @see {s}
|
|
// * {@link C.s}
|
|
// * @see {C.s}
|
|
// */
|
|
// r() { }
|
|
// }
|
|
//
|
|
// interface I {
|
|
// a()
|
|
// b: 1
|
|
// /**
|
|
// * {@link a}
|
|
// * @see {a}
|
|
// * {@link I.a}
|
|
// * @see {I.a}
|
|
// * {@link I#a}
|
|
// * @see {I#a}
|
|
// */
|
|
// c()
|
|
// /**
|
|
// * {@link b}
|
|
// * @see {b}
|
|
// * {@link I.b}
|
|
// * @see {I.b}
|
|
// */
|
|
// d()
|
|
// }
|
|
//
|
|
// function nestor() {
|
|
// /** {@link [|r2|]} */
|
|
// function ref() { }
|
|
// /** @see {[|r2|]} */
|
|
// function d3() { }
|
|
// function [|r2|]/*FIND ALL REFS*/() { }
|
|
// }
|
|
|
|
[
|
|
{
|
|
"definition": {
|
|
"containerKind": "",
|
|
"containerName": "",
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"kind": "local function",
|
|
"name": "(local function) r2(): void",
|
|
"textSpan": {
|
|
"start": 916,
|
|
"length": 2
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "local function",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "r2",
|
|
"kind": "functionName"
|
|
},
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "void",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"contextSpan": {
|
|
"start": 907,
|
|
"length": 17
|
|
}
|
|
},
|
|
"references": [
|
|
{
|
|
"textSpan": {
|
|
"start": 830,
|
|
"length": 2
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 874,
|
|
"length": 2
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 916,
|
|
"length": 2
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"contextSpan": {
|
|
"start": 907,
|
|
"length": 17
|
|
},
|
|
"isWriteAccess": true,
|
|
"isDefinition": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
|
|
// === /tests/cases/fourslash/findAllReferencesLinkTag1.ts ===
|
|
// class [|C|]/*FIND ALL REFS*/ {
|
|
// m() { }
|
|
// n = 1
|
|
// static s() { }
|
|
// /**
|
|
// * {@link m}
|
|
// * @see {m}
|
|
// * {@link [|C|].m}
|
|
// * @see {[|C|].m}
|
|
// * {@link [|C|]#m}
|
|
// * @see {[|C|]#m}
|
|
// * {@link [|C|].prototype.m}
|
|
// * @see {[|C|].prototype.m}
|
|
// */
|
|
// p() { }
|
|
// /**
|
|
// * {@link n}
|
|
// * @see {n}
|
|
// * {@link [|C|].n}
|
|
// * @see {[|C|].n}
|
|
// * {@link [|C|]#n}
|
|
// * @see {[|C|]#n}
|
|
// * {@link [|C|].prototype.n}
|
|
// * @see {[|C|].prototype.n}
|
|
// */
|
|
// q() { }
|
|
// /**
|
|
// * {@link s}
|
|
// * @see {s}
|
|
// * {@link [|C|].s}
|
|
// * @see {[|C|].s}
|
|
// */
|
|
// r() { }
|
|
// }
|
|
//
|
|
// interface I {
|
|
// a()
|
|
// b: 1
|
|
// /**
|
|
// * {@link a}
|
|
// * @see {a}
|
|
// * {@link I.a}
|
|
// * @see {I.a}
|
|
// * {@link I#a}
|
|
// * @see {I#a}
|
|
// */
|
|
// c()
|
|
// /**
|
|
// * {@link b}
|
|
// * @see {b}
|
|
// * {@link I.b}
|
|
// * @see {I.b}
|
|
// */
|
|
// d()
|
|
// }
|
|
//
|
|
// function nestor() {
|
|
// /** {@link r2} */
|
|
// function ref() { }
|
|
// /** @see {r2} */
|
|
// function d3() { }
|
|
// function r2() { }
|
|
// }
|
|
|
|
[
|
|
{
|
|
"definition": {
|
|
"containerKind": "",
|
|
"containerName": "",
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.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": 534
|
|
}
|
|
},
|
|
"references": [
|
|
{
|
|
"textSpan": {
|
|
"start": 6,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"contextSpan": {
|
|
"start": 0,
|
|
"length": 534
|
|
},
|
|
"isWriteAccess": true,
|
|
"isDefinition": true
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 106,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 124,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 143,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 161,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 180,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 208,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 298,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 316,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 335,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 353,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 372,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 400,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 490,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 508,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
|
|
// === /tests/cases/fourslash/findAllReferencesLinkTag1.ts ===
|
|
// class C {
|
|
// m() { }
|
|
// n = 1
|
|
// static s() { }
|
|
// /**
|
|
// * {@link m}
|
|
// * @see {m}
|
|
// * {@link C.m}
|
|
// * @see {C.m}
|
|
// * {@link C#m}
|
|
// * @see {C#m}
|
|
// * {@link C.prototype.m}
|
|
// * @see {C.prototype.m}
|
|
// */
|
|
// p() { }
|
|
// /**
|
|
// * {@link n}
|
|
// * @see {n}
|
|
// * {@link C.n}
|
|
// * @see {C.n}
|
|
// * {@link C#n}
|
|
// * @see {C#n}
|
|
// * {@link C.prototype.n}
|
|
// * @see {C.prototype.n}
|
|
// */
|
|
// q() { }
|
|
// /**
|
|
// * {@link s}
|
|
// * @see {s}
|
|
// * {@link C.s}
|
|
// * @see {C.s}
|
|
// */
|
|
// r() { }
|
|
// }
|
|
//
|
|
// interface [|I|]/*FIND ALL REFS*/ {
|
|
// a()
|
|
// b: 1
|
|
// /**
|
|
// * {@link a}
|
|
// * @see {a}
|
|
// * {@link [|I|].a}
|
|
// * @see {[|I|].a}
|
|
// * {@link [|I|]#a}
|
|
// * @see {[|I|]#a}
|
|
// */
|
|
// c()
|
|
// /**
|
|
// * {@link b}
|
|
// * @see {b}
|
|
// * {@link [|I|].b}
|
|
// * @see {[|I|].b}
|
|
// */
|
|
// d()
|
|
// }
|
|
//
|
|
// function nestor() {
|
|
// /** {@link r2} */
|
|
// function ref() { }
|
|
// /** @see {r2} */
|
|
// function d3() { }
|
|
// function r2() { }
|
|
// }
|
|
|
|
[
|
|
{
|
|
"definition": {
|
|
"containerKind": "",
|
|
"containerName": "",
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"kind": "interface",
|
|
"name": "interface I",
|
|
"textSpan": {
|
|
"start": 546,
|
|
"length": 1
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "interface",
|
|
"kind": "keyword"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "I",
|
|
"kind": "interfaceName"
|
|
}
|
|
],
|
|
"contextSpan": {
|
|
"start": 536,
|
|
"length": 257
|
|
}
|
|
},
|
|
"references": [
|
|
{
|
|
"textSpan": {
|
|
"start": 546,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"contextSpan": {
|
|
"start": 536,
|
|
"length": 257
|
|
},
|
|
"isWriteAccess": true,
|
|
"isDefinition": true
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 622,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 640,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 659,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 677,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 753,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
},
|
|
{
|
|
"textSpan": {
|
|
"start": 771,
|
|
"length": 1
|
|
},
|
|
"fileName": "/tests/cases/fourslash/findAllReferencesLinkTag1.ts",
|
|
"isWriteAccess": false,
|
|
"isDefinition": false
|
|
}
|
|
]
|
|
}
|
|
] |