aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alex Lam S.L <alexlamsl@gmail.com> 2023-08-05 03:30:38 +0300
committerGravatar GitHub <noreply@github.com> 2023-08-04 17:30:38 -0700
commit8275b8ccd2f0d39b482950dd809d6753c165607c (patch)
tree2b38f7ef63a9059a328a1ce10641391e4bc075a1
parentd196aa2de6074affd2ec8b4524302f214161fb37 (diff)
downloadbun-8275b8ccd2f0d39b482950dd809d6753c165607c.tar.gz
bun-8275b8ccd2f0d39b482950dd809d6753c165607c.tar.zst
bun-8275b8ccd2f0d39b482950dd809d6753c165607c.zip
[types] fix `blob.json()` (#3995)
-rw-r--r--packages/bun-types/globals.d.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/bun-types/globals.d.ts b/packages/bun-types/globals.d.ts
index bef79f57b..5ab3ac6fa 100644
--- a/packages/bun-types/globals.d.ts
+++ b/packages/bun-types/globals.d.ts
@@ -570,7 +570,7 @@ declare module "node:process" {
interface BlobInterface {
text(): Promise<string>;
arrayBuffer(): Promise<ArrayBuffer>;
- json<TJSONReturnType = unknown>(): Promise<TJSONReturnType>;
+ json<TJSONReturnType = any>(): Promise<TJSONReturnType>;
formData(): Promise<FormData>;
}
@@ -766,7 +766,7 @@ declare interface Blob {
* This first decodes the data from UTF-8, then parses it as JSON.
*
*/
- json<TJSONReturnType = unknown>(): Promise<TJSONReturnType>;
+ json<TJSONReturnType = any>(): Promise<TJSONReturnType>;
/**
* Read the data from the blob as a {@link FormData} object.
@@ -933,7 +933,7 @@ declare class Response implements BlobInterface {
* This first decodes the data from UTF-8, then parses it as JSON.
*
*/
- json<TJSONReturnType = unknown>(): Promise<TJSONReturnType>;
+ json<TJSONReturnType = any>(): Promise<TJSONReturnType>;
/**
* Read the data from the Response as a Blob.
@@ -1194,7 +1194,7 @@ declare class Request implements BlobInterface {
* This first decodes the data from UTF-8, then parses it as JSON.
*
*/
- json<TJSONReturnType = unknown>(): Promise<TJSONReturnType>;
+ json<TJSONReturnType = any>(): Promise<TJSONReturnType>;
/**
* Consume the [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) body as a `Blob`.