How to declare function parameter of type UInt8Array in TypeScript?
import * as fs from "fs";
fs.readFile(fileName, (err: string, data: UInt8Array) => {
if (err) {
return console.error(err);
}
console.log("file text: " + data.toString());
});
I'm having an error:
error TS2304: Cannot find name 'UInt8Array'
Thanks