-
Notifications
You must be signed in to change notification settings - Fork 204
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
setInterval - Type 'Timer' is not assignable to type 'number' #1053
Comments
I'm also having this issue. |
It seems like you are using declare function require(name: string): any |
Use |
See this thread for context: TypeStrong/atom-typescript#1053
Seems like a lame work-around, but I guess since difficult to determine which dependency in a large project introduced the ambient node types... |
I'm also having this issue in NodeJs. |
same here, really annoying |
Okay, complain about this on the TypeScript repo. We have zero control over how ambient types are resolved. |
Before resolved just use this for your browser code: |
As @SRHerzog suggested, use |
I am attempting to create an interval for a web app. But in the browser,
setInterval()
returns a number representing the ID of that interval. But instead, atom-typescript is saying it returns aNodeJS.Timer
object. It seems it's the wrong overload method.In short, the following works in the TypeScript playground, but doesn't work in atom-typescript:
The text was updated successfully, but these errors were encountered: