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
I tried via /// <reference lib="dom" /> but it looks like it's available everywhere then. It even ends up in globalThis.js and globalThis.d.ts so it is even visible in consumers.
Maybe some background why I reported this. I found that removing lib dom results in following compile error in consoleLogger.ts:
This expression is not callable.
Each member of the union type '{ <T, R>(this: (this: T) => R, thisArg: T): R; <T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } | { <T>(this: new () => T, thisArg: T): void; <T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void; }' has signatures, but none of those signatures are compatible with each other.
Reason is the Console is augmented in lib dom with by far more relaxed definitions.
Currently tsconfig.json doesn't include a
lib
config. This results in automatically including dom - browser types (see https://www.typescriptlang.org/tsconfig#lib)The only place where this is needed is for global this here
Should we aim to remove this to avoid that we use/rely on these types on other places?
The text was updated successfully, but these errors were encountered: