elysia 2.0.0-exp.23 → 2.0.0-exp.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,6 +23,12 @@ interface ElysiaAdapterOptions {
23
23
  * Whether this adapter is web standard
24
24
  */
25
25
  isWebStandard: boolean;
26
+ /**
27
+ * Whether this adapter supports WebSocket.
28
+ *
29
+ * `.ws()` throws on non-Bun runtimes unless this is set.
30
+ */
31
+ websocket?: boolean;
26
32
  listen?(app: AnyElysia, options: string | number | Partial<Serve>, callback?: ListenCallback): void;
27
33
  /**
28
34
  * Stop server from serving
@@ -11,7 +11,7 @@ declare function responseToSetHeaders(response: Response, set?: Context['set']):
11
11
  cookie?: Record<string, BaseCookie>;
12
12
  } | {
13
13
  headers: any;
14
- status: number | "Bad Request" | "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "Unauthorized" | "Payment Required" | "Forbidden" | "Not Found" | "Method Not Allowed" | "Not Acceptable" | "Proxy Authentication Required" | "Request Timeout" | "Conflict" | "Gone" | "Length Required" | "Precondition Failed" | "Payload Too Large" | "URI Too Long" | "Unsupported Media Type" | "Range Not Satisfiable" | "Expectation Failed" | "I'm a teapot" | "Enhance Your Calm" | "Misdirected Request" | "Unprocessable Content" | "Locked" | "Failed Dependency" | "Too Early" | "Upgrade Required" | "Precondition Required" | "Too Many Requests" | "Request Header Fields Too Large" | "Unavailable For Legal Reasons" | "Internal Server Error" | "Not Implemented" | "Bad Gateway" | "Service Unavailable" | "Gateway Timeout" | "HTTP Version Not Supported" | "Variant Also Negotiates" | "Insufficient Storage" | "Loop Detected" | "Not Extended" | "Network Authentication Required";
14
+ status: number | "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "Bad Request" | "Unauthorized" | "Payment Required" | "Forbidden" | "Not Found" | "Method Not Allowed" | "Not Acceptable" | "Proxy Authentication Required" | "Request Timeout" | "Conflict" | "Gone" | "Length Required" | "Precondition Failed" | "Payload Too Large" | "URI Too Long" | "Unsupported Media Type" | "Range Not Satisfiable" | "Expectation Failed" | "I'm a teapot" | "Enhance Your Calm" | "Misdirected Request" | "Unprocessable Content" | "Locked" | "Failed Dependency" | "Too Early" | "Upgrade Required" | "Precondition Required" | "Too Many Requests" | "Request Header Fields Too Large" | "Unavailable For Legal Reasons" | "Internal Server Error" | "Not Implemented" | "Bad Gateway" | "Service Unavailable" | "Gateway Timeout" | "HTTP Version Not Supported" | "Variant Also Negotiates" | "Insufficient Storage" | "Loop Detected" | "Not Extended" | "Network Authentication Required";
15
15
  };
16
16
  interface CreateHandlerParameter {
17
17
  mapResponse(response: unknown, set: Context['set'], request?: Request): Response;
package/dist/base.d.ts CHANGED
@@ -949,23 +949,17 @@ declare class Elysia<const in out BasePath extends string = '', const in out Sco
949
949
  head<const Path extends string, const Schema extends IntersectIfObjectSchema<MergeSchema<UnwrapRoute<{}, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>, '', true>, MergeScopedSchemas<Metadata['schemas'], Ephemeral['schemas'], Volatile['schemas']>>, const Decorator extends Singleton & {
950
950
  derive: Ephemeral['derive'] & Volatile['derive'];
951
951
  }, const Handle extends InlineHandlerNonMacro<NoInfer<Schema>, NoInfer<Decorator>>>(path: Path, fn: Handle & Metadata['macro']): AddRoute<BasePath, Scope, Singleton, Definitions, Metadata, Routes, Ephemeral, Volatile, 'head', Path, Schema, {}, Handle>;
952
- all<const Path extends string, const Input extends Metadata['macro'] & InputSchema<keyof Definitions['typebox'] & string>, const Schema extends IntersectIfObjectSchema<MergeSchema<UnwrapRoute<Input, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>, '', undefined extends Input['params'] ? true : false>, MergeScopedSchemas<Metadata['schemas'], Ephemeral['schemas'], Volatile['schemas']>>, const Decorator extends Singleton & {
953
- derive: Ephemeral['derive'] & Volatile['derive'];
954
- }, const MacroContext extends ({} extends Metadata['macroFn'] ? {} : MacroToContext<Metadata['macroFn'], Omit<Input, NonResolvableMacroKey>, Definitions['typebox']>), const Handle extends ({} extends MacroContext ? InlineHandlerNonMacro<NoInfer<Schema>, NoInfer<Decorator>> : InlineHandler<NoInfer<Schema>, NoInfer<Decorator>, MacroContext>)>(path: Path, hook: LocalHook<Input, Schema & MacroContext, Decorator, Definitions['error'], keyof Metadata['parser']>, fn: Handle): this;
955
- all<const Path extends string, const Schema extends IntersectIfObjectSchema<MergeSchema<UnwrapRoute<{}, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>, '', true>, MergeScopedSchemas<Metadata['schemas'], Ephemeral['schemas'], Volatile['schemas']>>, const Decorator extends Singleton & {
956
- derive: Ephemeral['derive'] & Volatile['derive'];
957
- }, const Handle extends InlineHandlerNonMacro<NoInfer<Schema>, NoInfer<Decorator>>>(path: Path, fn: Handle & Metadata['macro']): this;
958
952
  /**
959
953
  * ### method
960
- * Register a handler for `path` with an arbitrary HTTP `method`
954
+ * Register handler for path with custom method
961
955
  *
962
956
  * ---
963
957
  * @example
964
958
  * ```typescript
965
- * import { Elysia } from 'elysia'
959
+ * import { Elysia, t } from 'elysia'
966
960
  *
967
961
  * new Elysia()
968
- * .method('REPORT', '/', () => 'hi')
962
+ * .method('Elysia', '/', 'hi')
969
963
  * ```
970
964
  */
971
965
  method<const Method extends HTTPMethod, const Path extends string, const Input extends Metadata['macro'] & InputSchema<keyof Definitions['typebox'] & string>, const Schema extends IntersectIfObjectSchema<MergeSchema<UnwrapRoute<Input, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>, '', undefined extends Input['params'] ? true : false>, MergeScopedSchemas<Metadata['schemas'], Ephemeral['schemas'], Volatile['schemas']>>, const Decorator extends Singleton & {
@@ -974,6 +968,12 @@ declare class Elysia<const in out BasePath extends string = '', const in out Sco
974
968
  method<const Method extends HTTPMethod, const Path extends string, const Schema extends IntersectIfObjectSchema<MergeSchema<UnwrapRoute<{}, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>, '', true>, MergeScopedSchemas<Metadata['schemas'], Ephemeral['schemas'], Volatile['schemas']>>, const Decorator extends Singleton & {
975
969
  derive: Ephemeral['derive'] & Volatile['derive'];
976
970
  }, const Handle extends InlineHandlerNonMacro<NoInfer<Schema>, NoInfer<Decorator>>>(method: Method, path: Path, fn: Handle & Metadata['macro']): AddRoute<BasePath, Scope, Singleton, Definitions, Metadata, Routes, Ephemeral, Volatile, Method, Path, Schema, {}, Handle>;
971
+ all<const Path extends string, const Input extends Metadata['macro'] & InputSchema<keyof Definitions['typebox'] & string>, const Schema extends IntersectIfObjectSchema<MergeSchema<UnwrapRoute<Input, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>, '', undefined extends Input['params'] ? true : false>, MergeScopedSchemas<Metadata['schemas'], Ephemeral['schemas'], Volatile['schemas']>>, const Decorator extends Singleton & {
972
+ derive: Ephemeral['derive'] & Volatile['derive'];
973
+ }, const MacroContext extends ({} extends Metadata['macroFn'] ? {} : MacroToContext<Metadata['macroFn'], Omit<Input, NonResolvableMacroKey>, Definitions['typebox']>), const Handle extends ({} extends MacroContext ? InlineHandlerNonMacro<NoInfer<Schema>, NoInfer<Decorator>> : InlineHandler<NoInfer<Schema>, NoInfer<Decorator>, MacroContext>)>(path: Path, hook: LocalHook<Input, Schema & MacroContext, Decorator, Definitions['error'], keyof Metadata['parser']>, fn: Handle): this;
974
+ all<const Path extends string, const Schema extends IntersectIfObjectSchema<MergeSchema<UnwrapRoute<{}, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>, '', true>, MergeScopedSchemas<Metadata['schemas'], Ephemeral['schemas'], Volatile['schemas']>>, const Decorator extends Singleton & {
975
+ derive: Ephemeral['derive'] & Volatile['derive'];
976
+ }, const Handle extends InlineHandlerNonMacro<NoInfer<Schema>, NoInfer<Decorator>>>(path: Path, fn: Handle & Metadata['macro']): this;
977
977
  /**
978
978
  * ### ws
979
979
  * Register a WebSocket route. Mirrors `.get`/`.post` ergonomics:
package/dist/base.js CHANGED
@@ -762,14 +762,14 @@ var Elysia = class Elysia {
762
762
  head(path, hookOrFn, fn) {
763
763
  return fn === void 0 ? this.#add(require_constants.MethodMap.HEAD, path, hookOrFn) : this.#add(require_constants.MethodMap.HEAD, path, fn, hookOrFn);
764
764
  }
765
+ method(method, path, hookOrFn, fn) {
766
+ return fn === void 0 ? this.#add(method, path, hookOrFn) : this.#add(method, path, fn, hookOrFn);
767
+ }
765
768
  all(path, hookOrFn, fn) {
766
769
  if (fn === void 0) this.#add("*", path, hookOrFn);
767
770
  else this.#add("*", path, fn, hookOrFn);
768
771
  return this;
769
772
  }
770
- method(method, path, hookOrFn, fn) {
771
- return fn === void 0 ? this.#add(method, path, hookOrFn) : this.#add(method, path, fn, hookOrFn);
772
- }
773
773
  ws(path, optionsOrHandler, handler) {
774
774
  this["~hasWS"] = true;
775
775
  const adapter = this["~config"]?.adapter;
@@ -1029,7 +1029,7 @@ var Elysia = class Elysia {
1029
1029
  return this.#handle ??= async (requestOrUrl, options) => this.fetch(typeof requestOrUrl === "string" ? new Request(requestOrUrl.startsWith("/") ? `http://e.ly${requestOrUrl}` : requestOrUrl, options) : requestOrUrl);
1030
1030
  }
1031
1031
  listen(options, callback) {
1032
- const listen = (this["~config"]?.adapter ?? require_universal_constants.isBun ? require_adapter_bun_index.BunAdapter : void 0)?.listen;
1032
+ const listen = (this["~config"]?.adapter ?? (require_universal_constants.isBun ? require_adapter_bun_index.BunAdapter : void 0))?.listen;
1033
1033
  if (!listen) throw new Error("No adapter provided for listen()");
1034
1034
  if (!require_universal_env.env.ELYSIA_AOT_BUILD) listen(this, options, callback);
1035
1035
  return this;
package/dist/base.mjs CHANGED
@@ -759,14 +759,14 @@ var Elysia = class Elysia {
759
759
  head(path, hookOrFn, fn) {
760
760
  return fn === void 0 ? this.#add(MethodMap.HEAD, path, hookOrFn) : this.#add(MethodMap.HEAD, path, fn, hookOrFn);
761
761
  }
762
+ method(method, path, hookOrFn, fn) {
763
+ return fn === void 0 ? this.#add(method, path, hookOrFn) : this.#add(method, path, fn, hookOrFn);
764
+ }
762
765
  all(path, hookOrFn, fn) {
763
766
  if (fn === void 0) this.#add("*", path, hookOrFn);
764
767
  else this.#add("*", path, fn, hookOrFn);
765
768
  return this;
766
769
  }
767
- method(method, path, hookOrFn, fn) {
768
- return fn === void 0 ? this.#add(method, path, hookOrFn) : this.#add(method, path, fn, hookOrFn);
769
- }
770
770
  ws(path, optionsOrHandler, handler) {
771
771
  this["~hasWS"] = true;
772
772
  const adapter = this["~config"]?.adapter;
@@ -1026,7 +1026,7 @@ var Elysia = class Elysia {
1026
1026
  return this.#handle ??= async (requestOrUrl, options) => this.fetch(typeof requestOrUrl === "string" ? new Request(requestOrUrl.startsWith("/") ? `http://e.ly${requestOrUrl}` : requestOrUrl, options) : requestOrUrl);
1027
1027
  }
1028
1028
  listen(options, callback) {
1029
- const listen = (this["~config"]?.adapter ?? isBun ? BunAdapter : void 0)?.listen;
1029
+ const listen = (this["~config"]?.adapter ?? (isBun ? BunAdapter : void 0))?.listen;
1030
1030
  if (!listen) throw new Error("No adapter provided for listen()");
1031
1031
  if (!env.ELYSIA_AOT_BUILD) listen(this, options, callback);
1032
1032
  return this;
@@ -160,10 +160,10 @@ function compileHandlerJit({ method, path, handler, instance, root, hook, adapte
160
160
  const traceHandlers = hook?.trace ?? void 0;
161
161
  const hasTrace = !!traceHandlers?.length;
162
162
  const traceCount = hasTrace ? traceHandlers.length : 0;
163
- const beginTrace = (phase, total) => {
163
+ const beginTrace = (phase, total, name = phase) => {
164
164
  if (!hasTrace) return "";
165
165
  let s = "";
166
- for (let i = 0; i < traceCount; i++) s += `rp${i}=tr${i}.${phase}({id:c.rid,event:'${phase}',name:'${phase}',begin:performance.now(),total:${total}})\n`;
166
+ for (let i = 0; i < traceCount; i++) s += `rp${i}=tr${i}.${phase}({id:c.rid,event:'${phase}',name:${JSON.stringify(name)},begin:performance.now(),total:${total}})\n`;
167
167
  return s;
168
168
  };
169
169
  const endTrace = (errBinding) => {
@@ -330,7 +330,7 @@ function compileHandlerJit({ method, path, handler, instance, root, hook, adapte
330
330
  const teeBlock = teeConsumers > 0 && !syncAfterResponse ? `if(_r&&(_r[Symbol.iterator]||_r[Symbol.asyncIterator])&&typeof _r.next==='function'){\nconst _s=await tee(_r,${teeCount})\n_r=_s[0]\n` + (hasAfterResponse ? `_stl=_s[1]\n` : "") + (hasTrace ? `_trs=_s[${1 + (hasAfterResponse ? 1 : 0)}]\n` : "") + `}\n` : "";
331
331
  if (hasTrace) {
332
332
  const handleName = handler?.name && typeof handler.name === "string" ? handler.name : "anonymous";
333
- code += beginTrace("handle", 1);
333
+ code += beginTrace("handle", 1, handleName);
334
334
  const handleChild = buildReport("handle").resolveChild(handleName);
335
335
  code += handleChild.begin;
336
336
  if (hasBeforeHandle) code += `if(_r===undefined){\n${callHandler}${teeBlock}}\n`;
@@ -159,10 +159,10 @@ function compileHandlerJit({ method, path, handler, instance, root, hook, adapte
159
159
  const traceHandlers = hook?.trace ?? void 0;
160
160
  const hasTrace = !!traceHandlers?.length;
161
161
  const traceCount = hasTrace ? traceHandlers.length : 0;
162
- const beginTrace = (phase, total) => {
162
+ const beginTrace = (phase, total, name = phase) => {
163
163
  if (!hasTrace) return "";
164
164
  let s = "";
165
- for (let i = 0; i < traceCount; i++) s += `rp${i}=tr${i}.${phase}({id:c.rid,event:'${phase}',name:'${phase}',begin:performance.now(),total:${total}})\n`;
165
+ for (let i = 0; i < traceCount; i++) s += `rp${i}=tr${i}.${phase}({id:c.rid,event:'${phase}',name:${JSON.stringify(name)},begin:performance.now(),total:${total}})\n`;
166
166
  return s;
167
167
  };
168
168
  const endTrace = (errBinding) => {
@@ -329,7 +329,7 @@ function compileHandlerJit({ method, path, handler, instance, root, hook, adapte
329
329
  const teeBlock = teeConsumers > 0 && !syncAfterResponse ? `if(_r&&(_r[Symbol.iterator]||_r[Symbol.asyncIterator])&&typeof _r.next==='function'){\nconst _s=await tee(_r,${teeCount})\n_r=_s[0]\n` + (hasAfterResponse ? `_stl=_s[1]\n` : "") + (hasTrace ? `_trs=_s[${1 + (hasAfterResponse ? 1 : 0)}]\n` : "") + `}\n` : "";
330
330
  if (hasTrace) {
331
331
  const handleName = handler?.name && typeof handler.name === "string" ? handler.name : "anonymous";
332
- code += beginTrace("handle", 1);
332
+ code += beginTrace("handle", 1, handleName);
333
333
  const handleChild = buildReport("handle").resolveChild(handleName);
334
334
  code += handleChild.begin;
335
335
  if (hasBeforeHandle) code += `if(_r===undefined){\n${callHandler}${teeBlock}}\n`;
package/dist/error.d.ts CHANGED
@@ -85,7 +85,7 @@ declare class ElysiaStatus<const in out Code extends number | keyof StatusMap, T
85
85
  constructor(code: Code, res: T);
86
86
  get status(): number;
87
87
  }
88
- declare const status: <const Code extends number | keyof StatusMap, const T = (Code extends keyof StatusMapBack ? StatusMapBack[Code] : Code)>(code: Code, response?: T) => ElysiaStatus<Code, T, Code extends "Bad Request" | "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "Unauthorized" | "Payment Required" | "Forbidden" | "Not Found" | "Method Not Allowed" | "Not Acceptable" | "Proxy Authentication Required" | "Request Timeout" | "Conflict" | "Gone" | "Length Required" | "Precondition Failed" | "Payload Too Large" | "URI Too Long" | "Unsupported Media Type" | "Range Not Satisfiable" | "Expectation Failed" | "I'm a teapot" | "Enhance Your Calm" | "Misdirected Request" | "Unprocessable Content" | "Locked" | "Failed Dependency" | "Too Early" | "Upgrade Required" | "Precondition Required" | "Too Many Requests" | "Request Header Fields Too Large" | "Unavailable For Legal Reasons" | "Internal Server Error" | "Not Implemented" | "Bad Gateway" | "Service Unavailable" | "Gateway Timeout" | "HTTP Version Not Supported" | "Variant Also Negotiates" | "Insufficient Storage" | "Loop Detected" | "Not Extended" | "Network Authentication Required" ? {
88
+ declare const status: <const Code extends number | keyof StatusMap, const T = (Code extends keyof StatusMapBack ? StatusMapBack[Code] : Code)>(code: Code, response?: T) => ElysiaStatus<Code, T, Code extends "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "Bad Request" | "Unauthorized" | "Payment Required" | "Forbidden" | "Not Found" | "Method Not Allowed" | "Not Acceptable" | "Proxy Authentication Required" | "Request Timeout" | "Conflict" | "Gone" | "Length Required" | "Precondition Failed" | "Payload Too Large" | "URI Too Long" | "Unsupported Media Type" | "Range Not Satisfiable" | "Expectation Failed" | "I'm a teapot" | "Enhance Your Calm" | "Misdirected Request" | "Unprocessable Content" | "Locked" | "Failed Dependency" | "Too Early" | "Upgrade Required" | "Precondition Required" | "Too Many Requests" | "Request Header Fields Too Large" | "Unavailable For Legal Reasons" | "Internal Server Error" | "Not Implemented" | "Bad Gateway" | "Service Unavailable" | "Gateway Timeout" | "HTTP Version Not Supported" | "Variant Also Negotiates" | "Insufficient Storage" | "Loop Detected" | "Not Extended" | "Network Authentication Required" ? {
89
89
  readonly Continue: 100;
90
90
  readonly 'Switching Protocols': 101;
91
91
  readonly Processing: 102;
package/dist/index.d.ts CHANGED
@@ -17,5 +17,5 @@ import { Server } from "./universal/server.js";
17
17
  import { HTTPHeaders, InputSchema, Macro, MacroToContext, MacroToProperty, RouteSchema, SSEPayload, UnwrapRoute, UnwrapSchema } from "./types.js";
18
18
  import { form, prefix, redirect, sse } from "./utils.js";
19
19
  import { Context, ErrorContext, createBaseContext, createContext } from "./context.js";
20
- import { Elysia } from "./base.js";
21
- export { type AnySchema, type BaseCookie, type BaseSchema, Compiled, type Context, type Cookie, type CookieOptions, Elysia, Elysia as default, ElysiaError, ElysiaFile, ElysiaStatus, type ErrorContext, type FileTypeDetector, type HTTPHeaders, type InputSchema, InternalServerError, InvalidCookieSignature, type Macro, type MacroToContext, type MacroToProperty, Capture as Manifest, MultiValidator, NotFound, ParseError, type RouteSchema, type SSEPayload, type SelectiveStatus, type Server, type StandardJSONSchemaV1Like, type StandardSchemaV1Like, StandardValidator, StatusMap, StatusMapBack, type TCookieField, type TCookieObject, type TFiles, TypeBoxValidator, TypeSystem, type UnwrapRoute, type UnwrapSchema, ValidationError, Validator, createBaseContext, createContext, env, file, fileType, form, prefix, redirect, setFileTypeDetector, setupTypebox, sse, status, t, validationDetail };
20
+ import { AnyElysia, Elysia } from "./base.js";
21
+ export { AnyElysia, type AnySchema, type BaseCookie, type BaseSchema, Compiled, type Context, type Cookie, type CookieOptions, Elysia, Elysia as default, ElysiaError, ElysiaFile, ElysiaStatus, type ErrorContext, type FileTypeDetector, type HTTPHeaders, type InputSchema, InternalServerError, InvalidCookieSignature, type Macro, type MacroToContext, type MacroToProperty, Capture as Manifest, MultiValidator, NotFound, ParseError, type RouteSchema, type SSEPayload, type SelectiveStatus, type Server, type StandardJSONSchemaV1Like, type StandardSchemaV1Like, StandardValidator, StatusMap, StatusMapBack, type TCookieField, type TCookieObject, type TFiles, TypeBoxValidator, TypeSystem, type UnwrapRoute, type UnwrapSchema, ValidationError, Validator, createBaseContext, createContext, env, file, fileType, form, prefix, redirect, setFileTypeDetector, setupTypebox, sse, status, t, validationDetail };
@@ -36,7 +36,7 @@ declare const coerceQuery: () => CoerceOption[];
36
36
  declare const coerceBody: () => CoerceOption[];
37
37
  declare const coerceFormData: () => CoerceOption[];
38
38
  declare const coerceStringToStructure: () => CoerceOption[];
39
- declare function applyCoercions(schema: BaseSchema | TSchema, coerces: CoerceOption[] | undefined): TSchema | BaseSchema;
39
+ declare function applyCoercions(schema: BaseSchema | TSchema, coerces: CoerceOption[] | undefined): BaseSchema | TSchema;
40
40
  interface CoerceLeaf {
41
41
  e: number;
42
42
  c?: Record<string, unknown>;
@@ -17,7 +17,7 @@ declare const ELYSIA_TYPES: {
17
17
  readonly NoValidate: 15;
18
18
  };
19
19
  type ELYSIA_TYPES = typeof ELYSIA_TYPES;
20
- declare const primitiveElysiaTypes: Set<2 | 1 | 3 | 6 | 10 | 11 | 13 | 14>;
20
+ declare const primitiveElysiaTypes: Set<1 | 2 | 3 | 6 | 10 | 11 | 13 | 14>;
21
21
  declare const noEnumerable: {
22
22
  readonly enumerable: false;
23
23
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "elysia",
3
3
  "description": "Ergonomic Framework for Human",
4
- "version": "2.0.0-exp.23",
4
+ "version": "2.0.0-exp.25",
5
5
  "author": {
6
6
  "name": "saltyAom",
7
7
  "url": "https://github.com/SaltyAom",