function narrowUnknownTostring(rawParam: string | number): void {
const narrowedParamError: string = rawParam; // Type 'string | number' is not assignable to type 'string'. Type 'number' is not assignable to type 'string'.`
rawParam = castString(rawParam);`
const narrowedParamOk: string = rawParam; // Everything's fine`
}
Editor is loading...