function func(): unknown {
const b = { value: 321 } as unknown;
const c = { int: 222 } as unknown as InternalInterface;
return {
foo: 1,
bar: b,
baz: 3,
c: c,
};
}
function func2(): any {
const b = { value: 321 } as any;
const c = { field: 222 } as any as InternalInterface;
return {
foo: 1,
bar: b,
baz: 3,
c: c,
};
}
Expected output
function func() {
var b = { value: 321 };
var c = { _internal_int: 222 };
return {
foo: 1,
bar: b,
baz: 3,
c: c,
};
}
function func2() {
var b = { value: 321 };
var c = { _internal_field: 222 };
return {
foo: 1,
bar: b,
baz: 3,
c: c,
};
}
Actual output
function func() {
var b = { _internal_value: 321 };
var c = { _internal_int: 222 };
return {
_internal_foo: 1,
_internal_bar: b,
_internal_baz: 3,
_internal_c: c,
};
}
function func2() {
var b = { _internal_value: 321 };
var c = { _internal_field: 222 };
return {
_internal_foo: 1,
_internal_bar: b,
_internal_baz: 3,
_internal_c: c,
};
}
Bug report
Input code
Expected output
Actual output