New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
suggestion: offer a "default" export option to increase compatibility with es6 #31
Comments
The TypeScript team does not like us faking ES6 exports: sindresorhus/memoize#31
Sounds like you need to open a TypeScript issue instead about this. I'm going to pass on this as this is a slippery slope. If I allow this, I'll get requests for a separate ES6 sub-export for many of my other packages, and i'm just not interested in adding lots of temporary bloat and spending time on this because of TypeScript limitations. This is a temporary problem anyway. We're getting very close to have import/export natively in Node.js, and then I'll just fully switch over. |
ok, we'll fork for now until typescript and es6 converge. thanks for the consideration. |
when coding in typescript, using an
es6
orexnext
module backend, the suggestedis not allowed
an option, in these cases, is to use instead
but this requires that one's entire project be compiled with
allowSyntheticDefaultImports
, which has fairly wide-ranging implications on the code base, especially with regards to dynamic imports.might i suggest that strip-ansi offer e.g. an es6.js whose content is something like:
https://github.com/starpit/strip-ansi/blob/es6/es6.js
https://github.com/starpit/strip-ansi/blob/es6/es6.d.ts
which would allow
The text was updated successfully, but these errors were encountered: