#I can't write Uint32Array on a file.
2 messages · Page 1 of 1 (latest)
Sorry, here is a minimal example:
import { writeFileSync } from "node:fs";
writeFileSync('.data.bin', Uint32Array.from([1, 2, 3]));
command:
deno run --allow-all main.ts
2 messages · Page 1 of 1 (latest)
I want to write an Uint32Array type to a file, but i always have the following error:
error: Uncaught (in promise) TypeError: expected typed ArrayBufferView
I tried using Deno.writeFileSync and writeFileSync from node:fs, but no one worked. What can I do?
It seems like Deno is limiting us to write only the Uint8Array type.
Sorry, here is a minimal example:
import { writeFileSync } from "node:fs";
writeFileSync('.data.bin', Uint32Array.from([1, 2, 3]));
command:
deno run --allow-all main.ts