aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--types/bun/globals.d.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/types/bun/globals.d.ts b/types/bun/globals.d.ts
index 194cef2be..aad02d70f 100644
--- a/types/bun/globals.d.ts
+++ b/types/bun/globals.d.ts
@@ -216,7 +216,7 @@ declare module "node:process" {
interface BlobInterface {
text(): Promise<string>;
arrayBuffer(): Promise<ArrayBuffer>;
- json(): Promise<JSON>;
+ json<TJSONReturnType = unknown>(): Promise<TJSONReturnType>;
}
type BlobPart = string | Blob | ArrayBufferView | ArrayBuffer;
@@ -311,7 +311,7 @@ declare class Blob implements BlobInterface {
* This first decodes the data from UTF-8, then parses it as JSON.
*
*/
- json(): Promise<JSON>;
+ json<TJSONReturnType = unknown>(): Promise<TJSONReturnType>;
type: string;
size: number;
@@ -430,7 +430,7 @@ declare class Response implements BlobInterface {
* This first decodes the data from UTF-8, then parses it as JSON.
*
*/
- json(): Promise<JSON>;
+ json<TJSONReturnType = unknown>(): Promise<TJSONReturnType>;
/**
* Read the data from the Response as a Blob.
@@ -637,7 +637,7 @@ declare class Request implements BlobInterface {
* This first decodes the data from UTF-8, then parses it as JSON.
*
*/
- json(): Promise<JSON>;
+ json<TJSONReturnType = unknown>(): Promise<TJSONReturnType>;
/**
* Consume the [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) body as a `Blob`.