When I build my application I get. error TS2339: Property "split" does not exist on type "string | string[]".
Property "split" does not exist on type "string[]".
How can a split not exist on a string or string[].
Answer (1)
this.imageFileArray.push((reader.result as string).split(",")[1]);
this.imageFileArray.push((reader.result).split(",")[1]);