fix(ngc): comment out a private keyword in codegen. (#10949)

Workaround for b/30775898
This commit is contained in:
Alex Eagle 2016-08-22 14:28:09 -07:00 committed by Kara
parent e0fbca9fb0
commit 8560e1e4bf
2 changed files with 3 additions and 2 deletions

View File

@ -129,7 +129,8 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor
private _visitClassField(field: o.ClassField, ctx: EmitterVisitorContext) {
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(':');

View File

@ -240,7 +240,7 @@ export function main() {
'SomeClass', 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', () => {