Closed timocov closed 4 years ago
Bug report
Input code
interface Foo { field: string; field2: number; } type ReadonlyFoo = Readonly<Foo>; function bar(foo: ReadonlyFoo): void { console.log(foo.field, foo.field2); } function baz(): void { const foo: Foo = { field: '', field2: 0, }; bar(foo); bar({ field: '', field2: 0, }); }
Expected output
function bar(foo) { console.log(foo._internal_field, foo._internal_field2); } function baz() { var foo = { _internal_field: '', _internal_field2: 0, }; bar(foo); bar({ _internal_field: '', _internal_field2: 0, }); }
Actual output
function bar(foo) { console.log(foo.field, foo.field2); } function baz() { var foo = { _internal_field: '', _internal_field2: 0, }; bar(foo); bar({ field: '', field2: 0, }); }
Additional context
Broken in #15
Bug report
Input code
Expected output
Actual output
Additional context
Broken in #15