fix(ngc): comment out a private keyword in codegen. (#10949)
Workaround for b/30775898
This commit is contained in:
parent
e0fbca9fb0
commit
8560e1e4bf
|
@ -129,7 +129,8 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor
|
||||||
|
|
||||||
private _visitClassField(field: o.ClassField, ctx: EmitterVisitorContext) {
|
private _visitClassField(field: o.ClassField, ctx: EmitterVisitorContext) {
|
||||||
if (field.hasModifier(o.StmtModifier.Private)) {
|
if (field.hasModifier(o.StmtModifier.Private)) {
|
||||||
ctx.print(`private `);
|
// comment out as a workaround for #10967
|
||||||
|
ctx.print(`/*private*/ `);
|
||||||
}
|
}
|
||||||
ctx.print(field.name);
|
ctx.print(field.name);
|
||||||
ctx.print(':');
|
ctx.print(':');
|
||||||
|
|
|
@ -240,7 +240,7 @@ export function main() {
|
||||||
'SomeClass', null,
|
'SomeClass', null,
|
||||||
[new o.ClassField('someField', o.INT_TYPE, [o.StmtModifier.Private])], [], null,
|
[new o.ClassField('someField', o.INT_TYPE, [o.StmtModifier.Private])], [], null,
|
||||||
[])))
|
[])))
|
||||||
.toEqual(['class SomeClass {', ' private someField:number;', '}'].join('\n'));
|
.toEqual(['class SomeClass {', ' /*private*/ someField:number;', '}'].join('\n'));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support declaring getters', () => {
|
it('should support declaring getters', () => {
|
||||||
|
|
Loading…
Reference in New Issue