-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
question[TypeScript] How should AggregateError be imported as type when using TypeScript without esModuleInterop option #14
Comments
This is not the place to ask for general TypeScript support. |
I don't think that's possible, no. That is indeed a weird limitation though. I would have expected |
You are totally right. Sorry for "spamming" issues here. I will address this question to the proper TypeScript channel. Thanks for your attention and support ❤️ |
@sindresorhus the current CommonJS-style export makes A workaround was kindly suggested by @smockle via https://github.com/smockle/aggregate-error-test/: but it requires us to override I understand the change was done here: #9 which I think references sindresorhus/p-cancelable#19, but I don't see the reason why you decided to make that change? Is there a discussion somewhere that I can learn more about your reasoning? |
Update: I've found sindresorhus/memoize#31 (comment) (thanks @smockle) |
When trying to use
![image](https://user-images.githubusercontent.com/2574275/93539833-29138100-f952-11ea-8f4e-bdf955636835.png)
AggregateError
as type in a Typescript project the following issue happens:Conditions
esModuleInterop
intsconfig.json
Tried alternatives
(this would not fit the purpose of getting the
type
)(it implies enabling
moduleInterop
flag)Question
Considering the way this library is exposing AggregateError, Is there a way to import
AggregateError
in a ESModule way as Typescript type (so, noconst AggreagateError = require('aggregate-error')
and without enablingesModuleInterop
option?Details
You can find more details in:
The text was updated successfully, but these errors were encountered: