mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-27 13:42:16 -05:00
Add support of contextual quick info (#37451)
* Add support of contextual quick info * Avoid document comment map * Make lint happy Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
@@ -248,22 +248,22 @@ verify.quickInfos({
|
||||
1: ["class c1", "This is comment for c1"],
|
||||
2: ["(property) c1.p1: number", "p1 is property of c1"],
|
||||
3: ["(method) c1.p2(b: number): number", "sum with property"],
|
||||
6: ["(property) c1.p3: number", "getter property 1\nsetter property 1"],
|
||||
6: ["(property) c1.p3: number", "getter property 1"],
|
||||
"8q": ["(method) c1.p2(b: number): number", "sum with property"],
|
||||
10: ["(property) c1.p3: number", "getter property 1\nsetter property 1"],
|
||||
10: ["(property) c1.p3: number", "setter property 1"],
|
||||
"13q": ["(method) c1.p2(b: number): number", "sum with property"],
|
||||
14: ["(property) c1.pp1: number", "pp1 is property of c1"],
|
||||
15: ["(method) c1.pp2(b: number): number", "sum with property"],
|
||||
18: ["(property) c1.pp3: number", "getter property 2\nsetter property 2"],
|
||||
18: ["(property) c1.pp3: number", "getter property 2"],
|
||||
"20q": ["(method) c1.pp2(b: number): number", "sum with property"],
|
||||
22: ["(property) c1.pp3: number", "getter property 2\nsetter property 2"],
|
||||
22: ["(property) c1.pp3: number", "setter property 2"],
|
||||
"25q": ["(method) c1.pp2(b: number): number", "sum with property"],
|
||||
26: ["constructor c1(): c1", "Constructor method"],
|
||||
27: ["(property) c1.s1: number", "s1 is static property of c1"],
|
||||
28: ["(method) c1.s2(b: number): number", "static sum with property"],
|
||||
32: ["(property) c1.s3: number", "static getter property\nsetter property 3"],
|
||||
32: ["(property) c1.s3: number", "static getter property"],
|
||||
"35q": ["(method) c1.s2(b: number): number", "static sum with property"],
|
||||
37: ["(property) c1.s3: number", "static getter property\nsetter property 3"],
|
||||
37: ["(property) c1.s3: number", "setter property 3"],
|
||||
"42q": ["(method) c1.s2(b: number): number", "static sum with property"],
|
||||
43: "(property) c1.nc_p1: number",
|
||||
44: "(method) c1.nc_p2(b: number): number",
|
||||
|
||||
23
tests/cases/fourslash/quickInfoForGetterAndSetter.ts
Normal file
23
tests/cases/fourslash/quickInfoForGetterAndSetter.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
//// class Test {
|
||||
//// constructor() {
|
||||
//// this.value;
|
||||
//// }
|
||||
////
|
||||
//// /** Getter text */
|
||||
//// get val/*1*/ue() {
|
||||
//// return this.value;
|
||||
//// }
|
||||
////
|
||||
//// /** Setter text */
|
||||
//// set val/*2*/ue(value) {
|
||||
//// this.value = value;
|
||||
//// }
|
||||
//// }
|
||||
|
||||
goTo.marker("1");
|
||||
verify.quickInfoIs("(property) Test.value: any", "Getter text");
|
||||
|
||||
goTo.marker("2");
|
||||
verify.quickInfoIs("(property) Test.value: any", "Setter text");
|
||||
Reference in New Issue
Block a user