Missing / Incorrect Definition
https://undici.nodejs.org/#/docs/api/Dispatcher?id=parameter-responsedata
But thats not the case.
Sample Code
async function foo() {
const res = await fetch('https://example.com');
console.log(await res.bytes()); // error: Property 'bytes' does not exist on type 'Response'.ts(2339)
}
foo();
Using tsconfig.json:
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext"],
"types": [
"node"
],
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["index.ts"],
"exclude": ["node_modules"]
}
Missing / Incorrect Definition
https://undici.nodejs.org/#/docs/api/Dispatcher?id=parameter-responsedata
But thats not the case.
Sample Code
Using
tsconfig.json:{ "compilerOptions": { "target": "ESNext", "module": "ESNext", "lib": ["ESNext"], "types": [ "node" ], "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true }, "include": ["index.ts"], "exclude": ["node_modules"] }