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' diff --git a/src/treaty/types.ts b/src/treaty/types.ts index 044bf96..493f0b4 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 @@ -30,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 @@ -52,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<