type StrNumBoo = string | number | boolean; function test(arg1: StrNumBoo) { if(typeof arg1 === 'string') {} else { /* ... */ } }