refactor(ngcc): move ClassSymbol to become NgccClassSymbol (#32539)

PR Close #32539
This commit is contained in:
JoostK
2019-09-01 20:54:41 +02:00
committed by Kara Erickson
parent 222af38462
commit 2279cb8dc0
8 changed files with 51 additions and 45 deletions

View File

@ -8,12 +8,13 @@
import * as ts from 'typescript';
import {absoluteFrom} from '../../../src/ngtsc/file_system';
import {ClassSymbol, Declaration, Import} from '../../../src/ngtsc/reflection';
import {Declaration, Import} from '../../../src/ngtsc/reflection';
import {Logger} from '../logging/logger';
import {BundleProgram} from '../packages/bundle_program';
import {isDefined} from '../utils';
import {Esm5ReflectionHost} from './esm5_host';
import {NgccClassSymbol} from './ngcc_host';
export class CommonJsReflectionHost extends Esm5ReflectionHost {
protected commonJsExports = new Map<ts.SourceFile, Map<string, Declaration>|null>();
@ -57,7 +58,7 @@ export class CommonJsReflectionHost extends Esm5ReflectionHost {
* @param helperName the name of the helper (e.g. `__decorate`) whose calls we are interested in.
* @returns an array of nodes of calls to the helper with the given name.
*/
protected getHelperCallsForClass(classSymbol: ClassSymbol, helperName: string):
protected getHelperCallsForClass(classSymbol: NgccClassSymbol, helperName: string):
ts.CallExpression[] {
const esm5HelperCalls = super.getHelperCallsForClass(classSymbol, helperName);
if (esm5HelperCalls.length > 0) {
@ -244,4 +245,4 @@ function getOrDefault<K, V>(map: Map<K, V>, key: K, factory: (key: K) => V): V {
map.set(key, factory(key));
}
return map.get(key) !;
}
}