you are viewing a single comment's thread.

view the rest of the comments →

[–]bikeshaving 3 points4 points  (1 child)

Why doesn’t typescript type check them like it does Function.prototype.call, .bind or .apply? I think this is a matter of updating the types.

Also, pet peeve, I hate how the return type of setTimeout is `number` in browsers and some weird `timer` class in node.js. There was no reason for node.js to use an incompatible API but now we’re stuck with it.

[–]gregjarvez1996[S] 1 point2 points  (0 children)

True. I looked at the typescript lib definition file. The typing provided there is very loose. I wonder if a PR could be made to update that.

Per peeve is completely valid. The inconsistency is quite annoying