refactor(ngcc): move stripParentheses
to Esm5ReflectionHost
for re-use (#33777)
PR Close #33777
This commit is contained in:

committed by
Kara Erickson

parent
9f10aa0d8c
commit
1b489083bc
@ -12,7 +12,7 @@ import {absoluteFrom} from '../../../src/ngtsc/file_system';
|
||||
import {Declaration, Import} from '../../../src/ngtsc/reflection';
|
||||
import {Logger} from '../logging/logger';
|
||||
import {BundleProgram} from '../packages/bundle_program';
|
||||
import {Esm5ReflectionHost} from './esm5_host';
|
||||
import {Esm5ReflectionHost, stripParentheses} from './esm5_host';
|
||||
|
||||
export class UmdReflectionHost extends Esm5ReflectionHost {
|
||||
protected umdModules = new Map<ts.SourceFile, UmdModule|null>();
|
||||
@ -279,7 +279,3 @@ function findNamespaceOfIdentifier(id: ts.Identifier): ts.Identifier|null {
|
||||
id.parent.expression :
|
||||
null;
|
||||
}
|
||||
|
||||
export function stripParentheses(node: ts.Node): ts.Node {
|
||||
return ts.isParenthesizedExpression(node) ? node.expression : node;
|
||||
}
|
||||
|
Reference in New Issue
Block a user