-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
I have some NPM modules written that uses the old default export syntax:
declare module 'my-module' {
function test(): string;
export = test;
}
To promote ES import syntax but still keep the old one, I wanted to add both the new and old default export syntax:
declare module 'my-module' {
function test(): string;
export default test;
export = test; // An export assignment cannot be used in a module with other exported element
}
Though it complains that it cannot use an export assignment with other export statements.
I think it is reasonable to support both syntax simultaneously in a module. Because choosing between both syntax. I would choose export =
before export default
, simply because of no API breakage.
Metadata
Metadata
Assignees
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code