diff --git a/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts b/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts index f8ed94d344..d1f8b424b5 100644 --- a/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts +++ b/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts @@ -98,7 +98,7 @@ export class TypeScriptReflectionHost implements ReflectionHost { getExportsOfModule(node: ts.Node): Map|null { // In TypeScript code, modules are only ts.SourceFiles. Throw if the node isn't a module. if (!ts.isSourceFile(node)) { - throw new Error(`getDeclarationsOfModule() called on non-SourceFile in TS code`); + throw new Error(`getExportsOfModule() called on non-SourceFile in TS code`); } const map = new Map();