You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// bundled (by my program)declarenamespacemodule1{exportconsta:number;exportconstb:number;exportconstc:number;export ...
}// *** suggestion ***export*frommodule1;declareleta:number;export{aasfoobar};// current solutionimporta_=module1.a;// need to avoid the name dupplicationimportb=module1.b;importc=module1.c;import ...
export{a_asa,b,c, ... };declareleta:number;export{aasfoobar};
// bundled (by my program)declarenamespacemodule1{consta:number;// export default a; // suggesstionexport{aasdefault};// possible but not much meaningexport{aasdefault_};// bypass}// *** suggestion ***importafrommodule1;// current solutionimporta=module1.default_;// TS does not allow 'default' even at this point. bypass it.
import { ... } from namespace, export { ... } from namespace
// bundled (by my program)declarenamespacemodule1{exportconsta:number;exportconstb:number;exportconstc:number;exportconstd:number;}// *** suggestion **import{aasc,basd}frommodule1;export{c,d}frommodule1;// current solutionimportc=module1.a;importd=module1.b;importc_=module1.c;// need to avoid the name dupplicationimportd_=module1.d;export{c_asc,d_asd};
π» Use Cases
I'm trying to bundle d.ts files programmatically.
and replacing modules with namespaces.
but it's a little hard to bundle them perfectly with the current syntaxes.
The text was updated successfully, but these errors were encountered:
Suggestion
π Search Terms
export all from namespace
export default with namespace #24164
export from namespace
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
some namespace syntaxes are not compatible with module syntaxes.
It will be more flexible if they are supported.
π Motivating Example
It's hard to export all identifiers in the namespace.
Support
export { x as default }
in namespace declarationsΒ #24164π» Use Cases
I'm trying to bundle
d.ts
files programmatically.and replacing modules with namespaces.
but it's a little hard to bundle them perfectly with the current syntaxes.
The text was updated successfully, but these errors were encountered: