TypeScript Error: TS2769 in timezz.ts line 325
I'm encountering an error in my IDE:
Line 139 assigns NodeJS.Timer to the timeout variable:
private timeout: NodeJS.Timer | null = null;
If I change the type to NodeJS.Timeout, the error goes away.
This is possibly due to the type of environment the code is excecuted in.
I'm not a Node or JS guy... but this is what ChatGPT has to say:
So it might appear that my application is working in a Node.js environment, and not in a browser environment.
Hello, thank you for issue.
I've released a new version, can you try it now?
The code that my build is importing is from an assets folder in a 3rd party theme.
The code in the timerzz.ts file is exactly what I shown in the original issue.
private timeout: NodeJS.Timer | null = null;
Is it possible the author the theme has modified the code? Because I have viewed the code here in the master branch at version 7 and it was ReturnType... as you stated in the previously edited comment.
The package however does require the npm dependency of version 7.0.0 which leaves me to wonder if the theme author has edited the original code..
I fixed it in 8 version, so you can update the timezz and try again.
The code doesn't appear to have changed in the zip file:
I've notified the theme author of the issue, and sent him a link to this thread.
Let's see what he has to say?
Yes, off course, he should just update the timezz version to 8. Also, can you share a link to the theme?
Cartzilla | Multipurpose E-Commerce Bootstrap HTML Template (createx.studio)https://cartzilla.createx.studio/index.html