Closed
Description
TypeScript Version: 2.3.4
Code
module Bar {
export class Foo {
bla = 123;
}
}
class Foo {
bla = 123;
}
Bar.Foo = Foo; // no error
Foo = Bar.Foo; // error: "Cannot assign to 'Foo' because it is not a variable.
Expected behavior:
Either both of the last two lines to report an error, or none of them.
Actual behavior:
It is only an error to replace a class, if it is not inside a module.