Based on microsoft/TypeScript#48150 and https://stackoverflow.com/questions/71319489/type-observablefalse-is-not-assignable-to-type-observableboolean I report that in the Typescript 4.6 the type definitions are leading to compile errors. As stated, the definitions were not correct but the type system was fixed and now the error surfaced.
To be concrete, it will be necessary to make small changes all over the place like this:
FROM:
function observable<T>(value: T): Observable<T>
{
return undefined as any; // the implementation is not important
}
TO:
function observable<T, U = any>(value?: T extends infer R ? R : U): unknown extends T ? Observable<U> : Observable<T>
{
return undefined as any; // the implementation is not important
}Reactions are currently unavailable
Based on microsoft/TypeScript#48150 and https://stackoverflow.com/questions/71319489/type-observablefalse-is-not-assignable-to-type-observableboolean I report that in the Typescript 4.6 the type definitions are leading to compile errors. As stated, the definitions were not correct but the type system was fixed and now the error surfaced.
To be concrete, it will be necessary to make small changes all over the place like this:
FROM:
TO: