Argument of type 'string | ArrayBuffer' is not assignable to parameter of type 'string'. Type 'ArrayBuffer' is not assignable to type 'string code example
Example 1: const arr = new Uint8Array(fileReader.result).subarray(0, 4);
const arr = new Uint8Array(<ArrayBuffer>fileReader.result).subarray(0, 4);
Example 2: const arr = new Uint8Array(fileReader.result).subarray(0, 4);
this.imagePreview = reader.result as string;