Skip to content

Commit

Permalink
Use arrow functions to bind globals correctly in web scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
amcasey committed Jul 30, 2021
1 parent 6277305 commit eadb09a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/webServer/webServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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") }),
Expand Down

0 comments on commit eadb09a

Please sign in to comment.