fix(language-service): look for type constructors on canonical symbol
This commit is contained in:
parent
0a3a9afe58
commit
2ddf3bcdd1
|
@ -700,8 +700,9 @@ class TypeScriptSymbolQuery implements SymbolQuery {
|
||||||
return spanAt(this.source, line, column);
|
return spanAt(this.source, line, column);
|
||||||
}
|
}
|
||||||
|
|
||||||
private getTemplateRefContextType(type: ts.Symbol): ts.Symbol|undefined {
|
private getTemplateRefContextType(typeSymbol: ts.Symbol): ts.Symbol|undefined {
|
||||||
const constructor = type.members && type.members !['__constructor'];
|
const type = this.checker.getTypeOfSymbolAtLocation(typeSymbol, this.source);
|
||||||
|
const constructor = type.symbol && type.symbol.members && type.symbol.members['__constructor'];
|
||||||
if (constructor) {
|
if (constructor) {
|
||||||
const constructorDeclaration = constructor.declarations ![0] as ts.ConstructorTypeNode;
|
const constructorDeclaration = constructor.declarations ![0] as ts.ConstructorTypeNode;
|
||||||
for (const parameter of constructorDeclaration.parameters) {
|
for (const parameter of constructorDeclaration.parameters) {
|
||||||
|
|
Loading…
Reference in New Issue