timezz icon indicating copy to clipboard operation
timezz copied to clipboard

TypeScript Error: TS2769 in timezz.ts line 325

Open richardaubin opened this issue 1 year ago • 6 comments

I'm encountering an error in my IDE:

image

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:

image

So it might appear that my application is working in a Node.js environment, and not in a browser environment.

richardaubin avatar Jun 12 '24 01:06 richardaubin

Hello, thank you for issue.

I've released a new version, can you try it now?

letstri avatar Jun 12 '24 07:06 letstri

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..

richardaubin avatar Jun 12 '24 07:06 richardaubin

I fixed it in 8 version, so you can update the timezz and try again.

letstri avatar Jun 12 '24 07:06 letstri

The code doesn't appear to have changed in the zip file: image

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?

richardaubin avatar Jun 12 '24 07:06 richardaubin

Yes, off course, he should just update the timezz version to 8. Also, can you share a link to the theme?

letstri avatar Jun 12 '24 07:06 letstri

Cartzilla | Multipurpose E-Commerce Bootstrap HTML Template (createx.studio)https://cartzilla.createx.studio/index.html

richardaubin avatar Jun 12 '24 07:06 richardaubin