interface Initializing {
progress: number;
}
var isInitializing = (x: any): x is Initializing => {
return typeof x.progress === 'number';
}
The above code can be compiled without any error.
My question is related to ":x is Initializing" clause in the code. It seems that it doesn't affect generated JavaScript.
What ": x is Initializing" clause is used for? What kind of type checking is done? It seems that it is generating the same code when I call the function 'isInitializing' with any parameter. It produce the same JS code.
Examples are much appreciated.