Код: Выделить всё
function detonateBomb(): boolean {
return false;
}
if (detonateBomb() == null) {
console.log("Safe! Everyone is alive!");
} else {
console.log("Boooom! Everyone killed! Typescript is Literally NOT SAFE");
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... conditions