Comments (10)
Please consider opening a PR to fix this issue
from aedes.
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.
from aedes.
@hjdhjd Would you like to submit a PR to fix that?
from aedes.
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.
from aedes.
isn't there a way to keep the changes and fix what's not working?
from aedes.
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.
from aedes.
@hjdhjd I agree types can be imrpved a lot, go for the PR I will take a look 👍🏼
from aedes.
@hjdhjd I agree types can be imrpved a lot, go for the PR I will take a look 👍🏼
Submitted.
from aedes.
I just encountered a similar issue when trying to import in Typescript a module exported with module.exports = TheModule
.
Since TheModule
(in that case, ClinicBubbleprof
from @clinic/bubbleprof
) has no type definitions, I created them and the correct way to export it was by using export = TheModule
.
Then in the TS file, the import was done with import TheModule = require('path-to-the-module');
To keep on using the import X from x
syntax, i had to set esModuleInterop=true
in compilerOptions
.
from aedes.
@getlarge This should have been fixed by #918
from aedes.
Related Issues (20)
- [question] Connecting to AEDES with Certificates HOT 1
- Aedes handle, client not connected HOT 1
- Why is CONNACK returned before the end of on.connect HOT 2
- [question] Kotlin Android examples
- [question] How to get client ip address in Websocket mode HOT 1
- [feat!]: change to named exports to enable monkey patching HOT 11
- [question] Parsing a packet that come from old mqtt client version HOT 5
- Can Aedes send webhooks? HOT 2
- [bug] - TypeError during aedes Module Initialization
- mqtt服务启动后无法打印内容 HOT 2
- [bug] Aedes is undefined in Typescript HOT 7
- [bug] duplicated closed clients HOT 1
- [bug]"done" is not a function
- [question] does the test "unsubscribe throws error" valid? HOT 3
- [question] Any way to add data to connect packet and authorize handler? HOT 2
- [question]Frequent service clientError Error: invalid status code: 12592 HOT 1
- [bug] Number of TCP Connections accepted on container is less than the one deployed in EC2 machine HOT 7
- [bug] console.error introduced in v0.51.0 HOT 1
- [bug] Not all messages are consumed when dedupe is enabled HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aedes.