elysia 0.7.13 → 0.7.14
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.
- package/dist/bun/index.d.ts +7 -2
- package/dist/bun/index.js +21 -21
- package/dist/bun/index.js.map +4 -4
- package/dist/cjs/custom-types.d.ts +1 -1
- package/dist/cjs/custom-types.js +1 -1
- package/dist/cjs/index.d.ts +7 -2
- package/dist/custom-types.d.ts +1 -1
- package/dist/custom-types.js +1 -1
- package/dist/index.d.ts +7 -2
- package/package.json +1 -1
package/dist/bun/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { Static, TSchema } from '@sinclair/typebox';
|
|
|
4
4
|
import type { Context } from './context';
|
|
5
5
|
import type { WS } from './ws/types';
|
|
6
6
|
import type { ElysiaConfig, DecoratorBase, DefinitionBase, RouteBase, Handler, InputSchema, LocalHook, MergeSchema, RouteSchema, UnwrapRoute, InternalRoute, HTTPMethod, VoidHandler, PreHandler, BodyHandler, OptionalHandler, AfterHandler, ErrorHandler, LifeCycleStore, MaybePromise, Prettify, ListenCallback, AddPrefix, AddSuffix, AddPrefixCapitalize, AddSuffixCapitalize, TraceReporter, TraceHandler, MaybeArray, GracefulHandler } from './types';
|
|
7
|
+
import { t } from './custom-types';
|
|
7
8
|
/**
|
|
8
9
|
* ### Elysia Server
|
|
9
10
|
* Main instance to create web server using Elysia
|
|
@@ -890,8 +891,12 @@ export default class Elysia<BasePath extends string = '', Decorators extends Dec
|
|
|
890
891
|
}>;
|
|
891
892
|
error: Definitions['error'];
|
|
892
893
|
}, ParentSchema, Routes, Scoped>;
|
|
893
|
-
model<const NewType extends Record<string,
|
|
894
|
-
type:
|
|
894
|
+
model<const NewType extends Record<string, TSchema>>(mapper: (decorators: {
|
|
895
|
+
[type in keyof Definitions['type']]: ReturnType<typeof t.Unsafe<Definitions['type'][type]>>;
|
|
896
|
+
}) => NewType): Elysia<BasePath, Decorators, {
|
|
897
|
+
type: {
|
|
898
|
+
[x in keyof NewType]: Static<NewType[x]>;
|
|
899
|
+
};
|
|
895
900
|
error: Definitions['error'];
|
|
896
901
|
}, ParentSchema, Routes, Scoped>;
|
|
897
902
|
mapDerive<const NewStore extends Record<string, unknown>>(mapper: (decorators: Decorators['request']) => MaybePromise<NewStore>): Elysia<BasePath, {
|