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