From 11b19f5505c1c239b8698213276bed6d20ed28ee Mon Sep 17 00:00:00 2001 From: Max Holman Date: Fri, 6 Mar 2026 14:16:43 +0700 Subject: [PATCH] refactor: remove webworker lib and use RequestInit body type --- lib/command.ts | 2 +- lib/types.ts | 2 +- tsconfig.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/command.ts b/lib/command.ts index f8738cd..5e6ea49 100644 --- a/lib/command.ts +++ b/lib/command.ts @@ -14,7 +14,7 @@ type Middleware< CommandOutput extends Jsonifiable | unknown = unknown, > = (input: CommandInput, output: CommandOutput) => CommandOutput; -type Body = BodyInit | null | Uint8Array +type Body = RequestInit['body'] | null | Uint8Array export abstract class Command< // WARN: this must be kept compatible with the Client Input and Output types diff --git a/lib/types.ts b/lib/types.ts index c61c194..223a431 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -7,7 +7,7 @@ export type Resolver = () => T | Promise; export type ResolvableHeaders = Record>; export type FetcherParams = { - body?: BodyInit | Uint8Array | null; + body?: RequestInit['body'] | Uint8Array | null; url: URL; method: HttpMethod; headers?: Record; diff --git a/tsconfig.json b/tsconfig.json index a34e55c..1f7fc6b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "allowImportingTsExtensions": true, "noEmit": true, "noPropertyAccessFromIndexSignature": false, - "lib": ["es2024", "webworker"] + "lib": ["es2024"] }, "include": ["./src", "test", "./lib"], "exclude": ["./dist", "node_modules"]