-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Difficult to use in ES6 module package. #878
Comments
Please consider opening a PR to fix this issue |
As I mentioned here, and may be useful for others...this PR breaks TypeScript in straightforward use cases with simple tsconfigs. I would suggest this PR is reverted or updated to correct the errors. Removing the code introduced in the PR fixes the issue. |
@hjdhjd Would you like to submit a PR to fix that? |
Happy to, but it would be to revert the changes made in the prior PR. If you're good with that, I will be happy to submit it. |
isn't there a way to keep the changes and fix what's not working? |
The changes are the problem - they shouldn't be there in the first place because the prior code was correct. Here's a helpful stackoverflow answer: https://stackoverflow.com/questions/55506545/export-assignment-and-exporting-types-in-typescript-ambient-module In experimenting with aedes for a couple of days it seems many of the TypeScript typings are either incorrect or ambiguously defined. I'll take a closer look all around and put together a PR to correct some of them. |
@hjdhjd I agree types can be imrpved a lot, go for the PR I will take a look 👍🏼 |
Submitted. |
I just encountered a similar issue when trying to import in Typescript a module exported with |
In my TypeScript project, this code works ok ...
... until I add
"type": "module"
to mypackage.json
.It now shows the errors
Cannot use namespace 'Aedes' as a type
andthe expression is not constructable
.This is only workaround I could figure out:
The text was updated successfully, but these errors were encountered: