matrix-js-sdk
da423ed5 - Add comment that the timeout probably isn't

Commit
4 years ago
Add comment that the timeout probably isn't After a fair emount of investigation, it looks like there's not really a particularly elegant way to have an environment where setTimeout has a return type that makes sensible assertions in both node and the browser. Ideally we want it to be something that asserts that we don't try to use it as a NodeJS.Timeout (ie. call the methods) because that will break in a browser. In practice, this involves making wrappers or redefining the timeout functions or some similar kind of hackery, the evils of which probably offset having perfect typing. https://matrix.to/#/!bEWtlqtDwCLFIAKAcv:matrix.org/$vpFWl7p1_8A858RAccO0gud3sNVWIDNxNELRjdqaZQ4?via=matrix.org&via=mozilla.org&via=vector.modular.im for the discussion
Author
Parents
Loading