TypeScript Version: 2.3.4 and current playground
Code
namespace ns {
export default class Foo{ } // no error
}
ns.Foo; // error
ns.default; // no error
playground
Expected behavior:
Error at declaration that default exports are only allowed in ECMAScript modules.
Actual behavior:
No error at declaration.
Code completion shows ns.Foo but compiler prints warning.
Code completion does not show ns.default but tooltip reveals it is class ns.Foo. That's completely wrong because the emit does not contain any default export.
TypeScript Version: 2.3.4 and current playground
Code
playground
Expected behavior:
Error at declaration that default exports are only allowed in ECMAScript modules.
Actual behavior:
No error at declaration.
Code completion shows
ns.Foobut compiler prints warning.Code completion does not show
ns.defaultbut tooltip reveals it isclass ns.Foo. That's completely wrong because the emit does not contain any default export.