Answer the question
In order to leave comments, you need to log in
Is it possible in typescript to disable if for non-bool conditions?
In ts, as well as in js, constructions are allowed when using if you can check for an expression of any type.
For example, such options are valid
let x = 15;
if (x)...
let y = "hi";
if (y)...
let z = {...};
if (z)...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question