Open malthe opened 10 months ago
Not sure if this is the right place to mention this, but the Deno docs here have two issues: https://docs.deno.com/api/node/buffer/~/BufferEncoding
import { type BufferEncoding } from "node:buffer";
does not seem to work for me, trying to run a typescript file with this content says BufferEncoding is not exported from node:buffer"utf-16le"
which is in the docs definition but apparently not supported in node:buffer APIs.If I should raise this somewhere else, I'm happy to do so.
This is available on the NodeJS
global when using the @types/node
package (https://docs.deno.com/runtime/manual/node/npm_specifiers/#including-node-types).
function example(encoding: NodeJS.BufferEncoding) {
}
I moved this issue to the docs repo becacuse it incorrectly says to import it from the node:buffer
module as @hallvors pointed out.
The docs still reference importing from node:buffer
, which still doesn't work.
Version: Deno 1.38.5