See this Playground example.
class C {
constructor(baz?: unknown) {
print(`ctor: ${baz}`);
}
}
const foo = new C;
const bar = new C();
If you look at the last two lines of transpiled Lua code:
foo = __TS__New(C, true)
bar = __TS__New(C)
We see foo has an additional argument true passed to the constructor.
I feel like this is a bug.
See this Playground example.
If you look at the last two lines of transpiled Lua code:
We see
foohas an additional argumenttruepassed to the constructor.I feel like this is a bug.