File tree Expand file tree Collapse file tree 7 files changed +270
-3
lines changed Expand file tree Collapse file tree 7 files changed +270
-3
lines changed Original file line number Diff line number Diff line change @@ -649,9 +649,8 @@ namespace ts {
649
649
const isStaticMember = hasStaticModifier ( declaration ) ;
650
650
return firstDefined ( getAllSuperTypeNodes ( classOrInterfaceDeclaration ) , superTypeNode => {
651
651
const baseType = checker . getTypeAtLocation ( superTypeNode ) ;
652
- const symbol = isStaticMember
653
- ? find ( checker . getExportsOfModule ( baseType . symbol ) , s => s . escapedName === declaration . symbol . name )
654
- : checker . getPropertyOfType ( baseType , declaration . symbol . name ) ;
652
+ const type = isStaticMember && baseType . symbol ? checker . getTypeOfSymbol ( baseType . symbol ) : baseType ;
653
+ const symbol = checker . getPropertyOfType ( type , declaration . symbol . name ) ;
655
654
return symbol ? cb ( symbol ) : undefined ;
656
655
} ) ;
657
656
}
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "marker": {
4
+ "fileName": "/tests/cases/fourslash/quickInfoInheritDoc4.ts",
5
+ "position": 79,
6
+ "name": ""
7
+ },
8
+ "quickInfo": {
9
+ "kind": "method",
10
+ "kindModifiers": "static",
11
+ "textSpan": {
12
+ "start": 79,
13
+ "length": 5
14
+ },
15
+ "displayParts": [
16
+ {
17
+ "text": "(",
18
+ "kind": "punctuation"
19
+ },
20
+ {
21
+ "text": "method",
22
+ "kind": "text"
23
+ },
24
+ {
25
+ "text": ")",
26
+ "kind": "punctuation"
27
+ },
28
+ {
29
+ "text": " ",
30
+ "kind": "space"
31
+ },
32
+ {
33
+ "text": "B",
34
+ "kind": "className"
35
+ },
36
+ {
37
+ "text": ".",
38
+ "kind": "punctuation"
39
+ },
40
+ {
41
+ "text": "value",
42
+ "kind": "methodName"
43
+ },
44
+ {
45
+ "text": "(",
46
+ "kind": "punctuation"
47
+ },
48
+ {
49
+ "text": ")",
50
+ "kind": "punctuation"
51
+ },
52
+ {
53
+ "text": ":",
54
+ "kind": "punctuation"
55
+ },
56
+ {
57
+ "text": " ",
58
+ "kind": "space"
59
+ },
60
+ {
61
+ "text": "any",
62
+ "kind": "keyword"
63
+ }
64
+ ],
65
+ "documentation": [],
66
+ "tags": [
67
+ {
68
+ "name": "inheritdoc"
69
+ }
70
+ ]
71
+ }
72
+ }
73
+ ]
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "marker": {
4
+ "fileName": "/tests/cases/fourslash/quickInfoInheritDoc5.js",
5
+ "position": 83,
6
+ "name": ""
7
+ },
8
+ "quickInfo": {
9
+ "kind": "method",
10
+ "kindModifiers": "static",
11
+ "textSpan": {
12
+ "start": 83,
13
+ "length": 5
14
+ },
15
+ "displayParts": [
16
+ {
17
+ "text": "(",
18
+ "kind": "punctuation"
19
+ },
20
+ {
21
+ "text": "method",
22
+ "kind": "text"
23
+ },
24
+ {
25
+ "text": ")",
26
+ "kind": "punctuation"
27
+ },
28
+ {
29
+ "text": " ",
30
+ "kind": "space"
31
+ },
32
+ {
33
+ "text": "B",
34
+ "kind": "className"
35
+ },
36
+ {
37
+ "text": ".",
38
+ "kind": "punctuation"
39
+ },
40
+ {
41
+ "text": "value",
42
+ "kind": "methodName"
43
+ },
44
+ {
45
+ "text": "(",
46
+ "kind": "punctuation"
47
+ },
48
+ {
49
+ "text": ")",
50
+ "kind": "punctuation"
51
+ },
52
+ {
53
+ "text": ":",
54
+ "kind": "punctuation"
55
+ },
56
+ {
57
+ "text": " ",
58
+ "kind": "space"
59
+ },
60
+ {
61
+ "text": "any",
62
+ "kind": "keyword"
63
+ }
64
+ ],
65
+ "documentation": [],
66
+ "tags": [
67
+ {
68
+ "name": "inheritdoc"
69
+ }
70
+ ]
71
+ }
72
+ }
73
+ ]
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "marker": {
4
+ "fileName": "/tests/cases/fourslash/quickInfoInheritDoc6.js",
5
+ "position": 107,
6
+ "name": ""
7
+ },
8
+ "quickInfo": {
9
+ "kind": "method",
10
+ "kindModifiers": "static",
11
+ "textSpan": {
12
+ "start": 107,
13
+ "length": 5
14
+ },
15
+ "displayParts": [
16
+ {
17
+ "text": "(",
18
+ "kind": "punctuation"
19
+ },
20
+ {
21
+ "text": "method",
22
+ "kind": "text"
23
+ },
24
+ {
25
+ "text": ")",
26
+ "kind": "punctuation"
27
+ },
28
+ {
29
+ "text": " ",
30
+ "kind": "space"
31
+ },
32
+ {
33
+ "text": "B",
34
+ "kind": "className"
35
+ },
36
+ {
37
+ "text": ".",
38
+ "kind": "punctuation"
39
+ },
40
+ {
41
+ "text": "value",
42
+ "kind": "methodName"
43
+ },
44
+ {
45
+ "text": "(",
46
+ "kind": "punctuation"
47
+ },
48
+ {
49
+ "text": ")",
50
+ "kind": "punctuation"
51
+ },
52
+ {
53
+ "text": ":",
54
+ "kind": "punctuation"
55
+ },
56
+ {
57
+ "text": " ",
58
+ "kind": "space"
59
+ },
60
+ {
61
+ "text": "any",
62
+ "kind": "keyword"
63
+ }
64
+ ],
65
+ "documentation": [],
66
+ "tags": [
67
+ {
68
+ "name": "inheritdoc"
69
+ }
70
+ ]
71
+ }
72
+ }
73
+ ]
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts" />
2
+
3
+ // @Filename : quickInfoInheritDoc4.ts
4
+ ////var A: any;
5
+ ////
6
+ ////class B extends A {
7
+ //// /**
8
+ //// * @inheritdoc
9
+ //// */
10
+ //// static /**/value() {
11
+ //// return undefined;
12
+ //// }
13
+ //// }
14
+
15
+ verify . baselineQuickInfo ( ) ;
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts" />
2
+
3
+ // @allowJs : true
4
+ // @checkJs : true
5
+
6
+ // @Filename : quickInfoInheritDoc5.js
7
+ ////function A() {}
8
+ ////
9
+ ////class B extends A {
10
+ //// /**
11
+ //// * @inheritdoc
12
+ //// */
13
+ //// static /**/value() {
14
+ //// return undefined;
15
+ //// }
16
+ //// }
17
+
18
+ verify . baselineQuickInfo ( ) ;
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts" />
2
+
3
+ // @allowJs : true
4
+ // @checkJs : true
5
+
6
+ // @Filename : quickInfoInheritDoc6.js
7
+ ////class B extends UNRESOLVED_VALUE_DEFINITELY_DOES_NOT_EXIST {
8
+ //// /**
9
+ //// * @inheritdoc
10
+ //// */
11
+ //// static /**/value() {
12
+ //// return undefined;
13
+ //// }
14
+ //// }
15
+
16
+ verify . baselineQuickInfo ( ) ;
You can’t perform that action at this time.
0 commit comments