style(ngcc): reformat of ngcc after clang update (#36447)

PR Close #36447
This commit is contained in:
Pete Bacon Darwin
2020-04-06 08:30:08 +01:00
committed by Kara Erickson
parent bfa55162de
commit 74b7a8eaf5
118 changed files with 1386 additions and 1046 deletions

View File

@ -8,7 +8,7 @@
import * as ts from 'typescript';
import {absoluteFrom} from '../../../src/ngtsc/file_system';
import {TestFile, runInEachFileSystem} from '../../../src/ngtsc/file_system/testing';
import {runInEachFileSystem, TestFile} from '../../../src/ngtsc/file_system/testing';
import {Reference} from '../../../src/ngtsc/imports';
import {PartialEvaluator} from '../../../src/ngtsc/partial_evaluator';
import {TypeScriptReflectionHost} from '../../../src/ngtsc/reflection';
@ -44,19 +44,19 @@ runInEachFileSystem(() => {
getDeclaration(program, indexPath, 'someFunction', ts.isFunctionDeclaration);
const someVariableDecl =
getDeclaration(program, indexPath, 'someVariable', ts.isVariableDeclaration);
const testArrayExpression = testArrayDeclaration.initializer !;
const testArrayExpression = testArrayDeclaration.initializer!;
const reflectionHost = new TypeScriptReflectionHost(checker);
const evaluator = new PartialEvaluator(reflectionHost, checker, /* dependencyTracker */ null);
const registry = new NgccReferencesRegistry(reflectionHost);
const references = (evaluator.evaluate(testArrayExpression) as any[]).filter(isReference);
registry.add(null !, ...references);
registry.add(null!, ...references);
const map = registry.getDeclarationMap();
expect(map.size).toEqual(2);
expect(map.get(someClassDecl.name !) !.node).toBe(someClassDecl);
expect(map.get(someFunctionDecl.name !) !.node).toBe(someFunctionDecl);
expect(map.get(someClassDecl.name!)!.node).toBe(someClassDecl);
expect(map.get(someFunctionDecl.name!)!.node).toBe(someFunctionDecl);
expect(map.has(someVariableDecl.name as ts.Identifier)).toBe(false);
});
});