Currently, this is allowed:
function foo() {}
foo.bar = "bar";
But it produces bad code since functions are not tables in lua.
A variant of this is namespace merging into a function:
function foo() {}
namespace foo {
export let bar = "bar";
}
I'm not sure if there's a reasonable way to support this. It's probably just something that should be an error.
Currently, this is allowed:
But it produces bad code since functions are not tables in lua.
A variant of this is namespace merging into a function:
I'm not sure if there's a reasonable way to support this. It's probably just something that should be an error.