-
Notifications
You must be signed in to change notification settings - Fork 230
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
Compatibility with Node 20: NodeJS.Timer vs NodeJS.Timeout #341
Comments
eleith
pushed a commit
that referenced
this issue
Sep 6, 2023
awesome. thanks for the breakdown. will resolve with one of your suggestions. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
``There seems to be a compatibility issue when using emailjs with Node 20 and TypeScript, since the Timeout interface has a new dispose method:
The issue seems to be cause by the type annotation in client.ts
The type NodeJS.Timer is a legacy type that does not have the dispose method.
Later the setTimeout method actually returns a NodeJS.Timeout (with the required dispose method).
The error is caused by the clearTimeout call, that requires a NodeJS.Timeout but is given a NodeJS.Timer:
Potential fix: Annotate timer with the correct type
Or potentially be more generic:
Versions:
The text was updated successfully, but these errors were encountered: