@elysiajs/eden
Advanced tools
Comparing version 1.0.0-rc.4 to 1.0.0-rc.5
@@ -57,7 +57,8 @@ import { InputSchema, Elysia } from 'elysia'; | ||
query: Query; | ||
}) extends infer Param ? {} extends Param ? undefined extends Body ? K extends 'get' | 'head' ? (options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body?: Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : K extends 'get' | 'head' ? (options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : never : Extract<keyof Route[K], `:${string}`> extends infer Path extends string ? IsNever<Path> extends true ? Prettify<Sign<Route[K]>> : // ! DO NOT USE PRETTIFY ON THIS LINE, OTHERWISE FUNCTION CALLING WILL BE OMITTED | ||
((params: { | ||
[param in Path extends `:${infer Param}` ? Param : never]: string | number; | ||
}) => Prettify<Sign<Route[K][Path]>>) & Prettify<Sign<Route[K]>> : never; | ||
}) extends infer Param ? {} extends Param ? undefined extends Body ? K extends 'get' | 'head' ? (options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body?: Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : K extends 'get' | 'head' ? (options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : never : CreateParams<Route[K]>; | ||
}; | ||
type CreateParams<Route extends Record<string, any>> = Extract<keyof Route, `:${string}`> extends infer Path extends string ? IsNever<Path> extends true ? Prettify<Sign<Route>> : // ! DO NOT USE PRETTIFY ON THIS LINE, OTHERWISE FUNCTION CALLING WILL BE OMITTED | ||
((params: { | ||
[param in Path extends `:${infer Param}` ? Param : never]: string | number; | ||
}) => Prettify<Sign<Route[Path]>> & CreateParams<Route[Path]>) & Prettify<Sign<Route>> : never; | ||
export interface Config { | ||
@@ -64,0 +65,0 @@ fetch?: Omit<RequestInit, 'headers' | 'method'>; |
@@ -42,7 +42,8 @@ /// <reference types="bun-types" /> | ||
query: Query; | ||
}) extends infer Param ? {} extends Param ? undefined extends Body ? K extends 'get' | 'head' ? (options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body?: Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : K extends 'get' | 'head' ? (options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : never : Extract<keyof Route[K], `:${string}`> extends infer Path extends string ? IsNever<Path> extends true ? Prettify<Sign<Route[K]>> : // ! DO NOT USE PRETTIFY ON THIS LINE, OTHERWISE FUNCTION CALLING WILL BE OMITTED | ||
((params: { | ||
[param in Path extends `:${infer Param}` ? Param : never]: string | number; | ||
}) => Prettify<Sign<Route[K][Path]>>) & Prettify<Sign<Route[K]>> : never; | ||
}) extends infer Param ? {} extends Param ? undefined extends Body ? K extends 'get' | 'head' ? (options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body?: Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options?: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : K extends 'get' | 'head' ? (options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : (body: Body extends Record<string, unknown> ? ReplaceBlobWithFiles<Body> : Body, options: Prettify<Param & TreatyParam>) => Promise<TreatyResponse<Response>> : never : CreateParams<Route[K]>; | ||
}; | ||
type CreateParams<Route extends Record<string, any>> = Extract<keyof Route, `:${string}`> extends infer Path extends string ? IsNever<Path> extends true ? Prettify<Sign<Route>> : // ! DO NOT USE PRETTIFY ON THIS LINE, OTHERWISE FUNCTION CALLING WILL BE OMITTED | ||
((params: { | ||
[param in Path extends `:${infer Param}` ? Param : never]: string | number; | ||
}) => Prettify<Sign<Route[Path]>> & CreateParams<Route[Path]>) & Prettify<Sign<Route>> : never; | ||
export interface Config { | ||
@@ -49,0 +50,0 @@ fetch?: Omit<RequestInit, 'headers' | 'method'>; |
{ | ||
"name": "@elysiajs/eden", | ||
"version": "1.0.0-rc.4", | ||
"version": "1.0.0-rc.5", | ||
"description": "Fully type-safe Elysia client", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98834