refactor(ivy): ngcc - fake core and tslib should be typings files (#25445)

Previously these fake files were full TypeScript source
files (`.ts`) but this is not necessary as we only need the
typings not the implementation.

PR Close #25445
This commit is contained in:
Pete Bacon Darwin
2019-04-28 20:48:34 +01:00
committed by Jason Aden
parent 48b77459ef
commit 0fa72a8bc8
5 changed files with 28 additions and 41 deletions

View File

@ -1359,7 +1359,8 @@ describe('Esm2015ReflectionHost', () => {
.initializer as ts.Identifier;
const expectedDeclarationNode = getDeclaration(
program, 'node_modules/@angular/core/index.ts', 'Directive', isNamedVariableDeclaration);
program, 'node_modules/@angular/core/index.d.ts', 'Directive',
isNamedVariableDeclaration);
const actualDeclaration = host.getDeclarationOfIdentifier(identifierOfDirective);
expect(actualDeclaration).not.toBe(null);
expect(actualDeclaration !.node).toBe(expectedDeclarationNode);
@ -1419,9 +1420,7 @@ describe('Esm2015ReflectionHost', () => {
const values = Array.from(exportDeclarations !.values())
.map(declaration => [declaration.node.getText(), declaration.viaModule]);
expect(values).toEqual([
// TODO clarify what is expected here...
// [`Directive = callableClassDecorator()`, '@angular/core'],
[`Directive = callableClassDecorator()`, null],
[`Directive: FnWithArg<(clazz: any) => any>`, null],
[`a = 'a'`, null],
[`b = a`, null],
[`c = foo`, null],