💥 breaking: upgrade Elysia to v1.4 and update codebase accordingly
This commit is contained in:
8
src/helpers/types/InferSchema.ts
Normal file
8
src/helpers/types/InferSchema.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { Static } from "elysia";
|
||||
|
||||
export type InferSchema<S> = {
|
||||
body: S extends { body: any } ? Static<S["body"]> : never;
|
||||
query: S extends { query: any } ? Static<S["query"]> : never;
|
||||
params: S extends { params: any } ? Static<S["params"]> : never;
|
||||
headers: S extends { headers: any } ? Static<S["headers"]> : never;
|
||||
};
|
||||
Reference in New Issue
Block a user