You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
declarefunctionisString(v: any): v is string;declarefunctionisNumber(v: any): v is number;declareletvalue: number;// this condition will probably always be false, otherwise you have some really messed up codeif(isString(value)){value.charAt(0);}// typeguard is useless because `value` is already `number` or a subtype thereofif(isNumber(value)){value.toFixed(0);}
This needs type relationship APIs to detect if the typeguard type is not assignable to the original type.