fix(ivy): correctly detect classes in ngcc Esm5ReflectionHost (#25406)

PR Close #25406
This commit is contained in:
George Kalpakas
2018-07-25 13:01:58 +03:00
committed by Matias Niemelä
parent 3211432d2a
commit 9e179cb311
6 changed files with 153 additions and 29 deletions

View File

@ -406,9 +406,9 @@ export interface ReflectionHost {
getExportsOfModule(module: ts.Node): Map<string, Declaration>|null;
/**
* Check whether the given declaration node actually represents a class.
* Check whether the given node actually represents a class.
*/
isClass(node: ts.Declaration): boolean;
isClass(node: ts.Node): boolean;
hasBaseClass(node: ts.Declaration): boolean;
}

View File

@ -127,7 +127,7 @@ export class TypeScriptReflectionHost implements ReflectionHost {
return map;
}
isClass(node: ts.Declaration): boolean {
isClass(node: ts.Node): boolean {
// In TypeScript code, classes are ts.ClassDeclarations.
return ts.isClassDeclaration(node);
}