A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Microsoft/TypeScript/issues/24013 below:

Type parameters no longer assignable to unions with `object` and `undefined` in strict null checks · Issue #24013 · microsoft/TypeScript · GitHub

TypeScript Version: 2.9.0-dev.20180509

Search Terms:

Code

function f<T>(x: T) {
    const y: object | null | undefined = x;
}

in 2.8 with strictNullChecks on, this compiles (it does not when it is off). In very recent master, however, it is now an error (as it should be?):

Playground Link

While I think the error is certainly correct to issue, this change apparently breaks a handful of RWC tests, so is worth looking into.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4