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
exportconstconfig={/** * The promise constructor used by default for methods such as * {@link toPromise} and {@link forEach} */Promise: undefinedasPromiseConstructorLike,
Fails with compilation error:
TypeScript error in D:/Dev/OpDashBoard/FrontEnd/ClientApp/node_modules/rxjs/src/internal/config.ts(12,12):
Conversion of type 'undefined' to type 'PromiseConstructorLike' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. TS2352
In the interim, you could - should, IMO - specify skipLibCheck in the compiler options in your tsconfig.json. There really is little point in having TypeScript check the internals of packages within node_modules when those packages contains .d.ts files that have already passed through the TypeScript compiler.
I'm going to close this as it's a sub-case of a known issue: the TypeScript compiler options used to build RxJS are insufficiently strict. In particular, strictNullChecks is false. See #4968
RxJS: 6.5.3
TS: 3.6.2
src/internal/config.ts
Fails with compilation error:
I think the fix would be to define it as:
Or maybe another, cleaner way.
Repro in Playground
The text was updated successfully, but these errors were encountered: