-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Fix setTimeout/setInterval/setImmediate functions #19635
Comments
I think it allows |
Then this is valid, right? declare function setTimeout(handler: ((...args: any[]) => void) | string, timeout?: number, ...args: any[]): number; |
Be aware, that if you pass a Douglas Crockford warned of this. Perhaps this second declaration could go into @RyanCavanaugh's proposed Annex B 😉 |
Looking at some of the new features that Typescript provides, I'd expect the following to be a better more specific definition
|
Hi, no news about this? |
We hit this problem. TypeScript does not check this code:
|
Fix too lax typings.
TypeScript Version: master
Expected behavior:
Actual behavior:
The text was updated successfully, but these errors were encountered: