You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conflict with Object.prototype.watch in FireFox/Gecko
In Gecko engine `commandLine.options.watch` evaluates to a truthy value (a function). Adding an extra check to work around.
[Definition of CompilerOptions.watch in compiler/types](https://github.com/Microsoft/TypeScript/blob/master/src/compiler/types.ts#L1860)
``` typescript
export interface CompilerOptions {
// . . .
watch?: boolean;
```
[Object.prototype.watch on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch)
> Warning: Generally you should avoid using watch() and unwatch() when possible. These two methods are
> implemented only in Gecko, and they're intended primarily for debugging use. In addition, using watchpoints
> has a serious negative impact on performance, which is especially true when used on global objects, such
> as window. You can usually use setters and getters or proxies instead. See Browser compatibility for details.
> Also, do not confuse Object.watch with Object.observe.
0 commit comments