mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-03 08:40:12 +00:00
This allows patterns such as this when strict null checks are on:
let instance: Thing | undefined;
function getInstance(): Thing {
return instance || invariant(false, "`instance` not instantiated");
}