Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/services/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,8 @@ namespace ts {
const isStaticMember = hasStaticModifier(declaration);
return firstDefined(getAllSuperTypeNodes(classOrInterfaceDeclaration), superTypeNode => {
const baseType = checker.getTypeAtLocation(superTypeNode);
const symbol = isStaticMember
? find(checker.getExportsOfModule(baseType.symbol), s => s.escapedName === declaration.symbol.name)
: checker.getPropertyOfType(baseType, declaration.symbol.name);
const type = isStaticMember && baseType.symbol ? checker.getTypeOfSymbol(baseType.symbol) : baseType;
const symbol = checker.getPropertyOfType(type, declaration.symbol.name);
return symbol ? cb(symbol) : undefined;
});
}
Expand Down
73 changes: 73 additions & 0 deletions tests/baselines/reference/quickInfoInheritDoc4.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoInheritDoc4.ts",
"position": 79,
"name": ""
},
"quickInfo": {
"kind": "method",
"kindModifiers": "static",
"textSpan": {
"start": 79,
"length": 5
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "method",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "B",
"kind": "className"
},
{
"text": ".",
"kind": "punctuation"
},
{
"text": "value",
"kind": "methodName"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "any",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "inheritdoc"
}
]
}
}
]
73 changes: 73 additions & 0 deletions tests/baselines/reference/quickInfoInheritDoc5.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoInheritDoc5.js",
"position": 83,
"name": ""
},
"quickInfo": {
"kind": "method",
"kindModifiers": "static",
"textSpan": {
"start": 83,
"length": 5
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "method",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "B",
"kind": "className"
},
{
"text": ".",
"kind": "punctuation"
},
{
"text": "value",
"kind": "methodName"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "any",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "inheritdoc"
}
]
}
}
]
73 changes: 73 additions & 0 deletions tests/baselines/reference/quickInfoInheritDoc6.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoInheritDoc6.js",
"position": 107,
"name": ""
},
"quickInfo": {
"kind": "method",
"kindModifiers": "static",
"textSpan": {
"start": 107,
"length": 5
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "method",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "B",
"kind": "className"
},
{
"text": ".",
"kind": "punctuation"
},
{
"text": "value",
"kind": "methodName"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "any",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "inheritdoc"
}
]
}
}
]
15 changes: 15 additions & 0 deletions tests/cases/fourslash/quickInfoInheritDoc4.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/// <reference path="fourslash.ts" />

// @Filename: quickInfoInheritDoc4.ts
////var A: any;
////
////class B extends A {
//// /**
//// * @inheritdoc
//// */
//// static /**/value() {
//// return undefined;
//// }
////}

verify.baselineQuickInfo();
18 changes: 18 additions & 0 deletions tests/cases/fourslash/quickInfoInheritDoc5.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/// <reference path="fourslash.ts" />

// @allowJs: true
// @checkJs: true

// @Filename: quickInfoInheritDoc5.js
////function A() {}
////
////class B extends A {
//// /**
//// * @inheritdoc
//// */
//// static /**/value() {
//// return undefined;
//// }
////}

verify.baselineQuickInfo();
16 changes: 16 additions & 0 deletions tests/cases/fourslash/quickInfoInheritDoc6.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/// <reference path="fourslash.ts" />

// @allowJs: true
// @checkJs: true

// @Filename: quickInfoInheritDoc6.js
////class B extends UNRESOLVED_VALUE_DEFINITELY_DOES_NOT_EXIST {
//// /**
//// * @inheritdoc
//// */
//// static /**/value() {
//// return undefined;
//// }
////}

verify.baselineQuickInfo();