From 5b24128424eb453c450645d6e70f683e861772f1 Mon Sep 17 00:00:00 2001 From: Chris Kalmar Date: Sun, 17 Mar 2024 13:34:20 +0100 Subject: [PATCH 1/3] drop unused imports --- src/errors.ts | 2 -- src/index.ts | 5 ----- 2 files changed, 7 deletions(-) diff --git a/src/errors.ts b/src/errors.ts index 2abb05d..838c53e 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -1,5 +1,3 @@ -import type { serialize, deserialize } from 'superjson' - export class EdenFetchError< Status extends number = number, Value = unknown diff --git a/src/index.ts b/src/index.ts index 77493bc..ee270c7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,2 @@ -import type { Elysia } from 'elysia' - -import type { EdenTreaty } from './treaty' -import type { EdenFetch } from './fetch' - export { edenTreaty } from './treaty' export { edenFetch } from './fetch' From f5d3e0adf265ff882ad7ed667fea98ba61f4c9c0 Mon Sep 17 00:00:00 2001 From: Chris Kalmar Date: Sun, 17 Mar 2024 13:34:28 +0100 Subject: [PATCH 2/3] drop unused imports --- src/treaty/types.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/treaty/types.ts b/src/treaty/types.ts index 044bf96..14a0370 100644 --- a/src/treaty/types.ts +++ b/src/treaty/types.ts @@ -1,13 +1,7 @@ /// import type { Elysia } from 'elysia' import type { EdenWS } from './index' -import type { - IsUnknown, - IsNever, - IsAny, - UnionToIntersect, - MapError -} from '../types' +import type { IsUnknown, IsNever, UnionToIntersect, MapError } from '../types' import type { EdenFetchError } from '../errors' type Files = File | FileList From 333616552e19b0034c6e62f189214085c4fc7b5b Mon Sep 17 00:00:00 2001 From: Chris Kalmar Date: Sun, 17 Mar 2024 13:36:07 +0100 Subject: [PATCH 3/3] remove unused types --- src/treaty/types.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/treaty/types.ts b/src/treaty/types.ts index 14a0370..493f0b4 100644 --- a/src/treaty/types.ts +++ b/src/treaty/types.ts @@ -24,10 +24,6 @@ type Split = S extends `${infer Head}/${infer Tail}` ? [Head] : [S] -type Prettify = { - [K in keyof T]: T[K] -} & {} - type AnySchema = { body: unknown headers: unknown @@ -46,12 +42,6 @@ export namespace EdenTreaty { ? UnionToIntersect> : 'Please install Elysia before using Eden' - type SplitKeys = T extends [infer First, ...infer Rest] - ? [First, Rest] - : T extends [infer First, ...infer Rest][number] - ? [First, Rest] - : never - type UnwrapPromise = T extends Promise ? A : T export type Transform = MaybeArray<