mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 11:24:49 -05:00
Use arrow functions to bind globals correctly in web scenarios (#45242)
* Use arrow functions to bind globals correctly in web scenarios https://github.com/microsoft/vscode/issues/127700#issuecomment-889443607 * Add missing spread operators
This commit is contained in:
@@ -130,10 +130,10 @@ namespace ts.server {
|
||||
getCurrentDirectory: returnEmptyString, // For inferred project root if projectRoot path is not set, normalizing the paths
|
||||
|
||||
/* eslint-disable no-restricted-globals */
|
||||
setTimeout,
|
||||
clearTimeout,
|
||||
setTimeout: (cb, ms, ...args) => setTimeout(cb, ms, ...args),
|
||||
clearTimeout: handle => clearTimeout(handle),
|
||||
setImmediate: x => setTimeout(x, 0),
|
||||
clearImmediate: clearTimeout,
|
||||
clearImmediate: handle => clearTimeout(handle),
|
||||
/* eslint-enable no-restricted-globals */
|
||||
|
||||
require: () => ({ module: undefined, error: new Error("Not implemented") }),
|
||||
|
||||
Reference in New Issue
Block a user