elysia 1.2.11 → 1.2.13
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/adapter/web-standard/index.mjs +1 -1
- package/dist/bun/index.d.ts +40 -40
- package/dist/bun/index.js +10 -9
- package/dist/bun/index.js.map +9 -9
- package/dist/cjs/adapter/web-standard/index.js +1 -1
- package/dist/cjs/compose.js +7 -7
- package/dist/cjs/dynamic-handle.d.ts +1 -0
- package/dist/cjs/dynamic-handle.js +9 -7
- package/dist/cjs/index.d.ts +40 -40
- package/dist/cjs/index.js +65 -16
- package/dist/cjs/type-system.d.ts +2 -2
- package/dist/cjs/type-system.js +68 -51
- package/dist/cjs/types.d.ts +10 -6
- package/dist/cjs/universal/file.js +7 -4
- package/dist/cjs/utils.d.ts +3 -0
- package/dist/cjs/utils.js +15 -10
- package/dist/cjs/ws/types.d.ts +6 -15
- package/dist/compose.mjs +9 -8
- package/dist/dynamic-handle.d.ts +1 -0
- package/dist/dynamic-handle.mjs +10 -7
- package/dist/index.d.ts +40 -40
- package/dist/index.mjs +67 -17
- package/dist/type-system.d.ts +2 -2
- package/dist/type-system.mjs +45 -33
- package/dist/types.d.ts +10 -6
- package/dist/universal/file.mjs +7 -4
- package/dist/utils.d.ts +3 -0
- package/dist/utils.mjs +14 -10
- package/dist/ws/types.d.ts +6 -15
- package/package.json +1 -1
|
@@ -73,7 +73,7 @@ else p=u.substring(s, qi)
|
|
|
73
73
|
fnLiteral += Object.keys(defaultHeaders ?? {}).length ? "Object.assign({}, app.setHeaders)" : "{}";
|
|
74
74
|
fnLiteral += `,status:200}`;
|
|
75
75
|
if (app.inference.server)
|
|
76
|
-
fnLiteral += `,get server(){return getServer()}`;
|
|
76
|
+
fnLiteral += `,get server(){return app.getServer()}`;
|
|
77
77
|
if (hasTrace) fnLiteral += ",[ELYSIA_REQUEST_ID]:id";
|
|
78
78
|
fnLiteral += decoratorsLiteral;
|
|
79
79
|
fnLiteral += `}
|
package/dist/bun/index.d.ts
CHANGED
|
@@ -114,7 +114,7 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
114
114
|
* @private DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
|
115
115
|
* @version 1.1.0
|
|
116
116
|
*
|
|
117
|
-
* ! Do not use unless you
|
|
117
|
+
* ! Do not use unless you know exactly what you are doing
|
|
118
118
|
* ? Add Higher order function to Elysia.fetch
|
|
119
119
|
*/
|
|
120
120
|
wrap(fn: HigherOrderFunction): this;
|
|
@@ -890,7 +890,7 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
890
890
|
}>>>(prefix: Prefix, schema: LocalHook<Input, Schema, Singleton & {
|
|
891
891
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
892
892
|
resolve: Ephemeral['resolve'] & Volatile['resolve'];
|
|
893
|
-
}, Definitions['error'], Metadata['macro'], keyof Metadata['parser'] & string>, run: (group: Elysia<JoinPath<BasePath, Prefix>, {
|
|
893
|
+
}, Definitions['error'], Metadata['macro'], keyof Metadata['macro'], keyof Metadata['parser'] & string>, run: (group: Elysia<JoinPath<BasePath, Prefix>, {
|
|
894
894
|
decorator: Singleton['decorator'];
|
|
895
895
|
store: Singleton['store'];
|
|
896
896
|
derive: Prettify<Singleton['derive'] & Ephemeral['derive'] & Volatile['derive']>;
|
|
@@ -901,12 +901,12 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
901
901
|
macroFn: Metadata['macroFn'];
|
|
902
902
|
parser: Metadata['parser'];
|
|
903
903
|
}, {}, Ephemeral, Volatile>) => NewElysia): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & NewElysia['_routes'], Ephemeral, Volatile>;
|
|
904
|
-
guard<const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], BasePath>, Metadata['schema']>, const Type extends LifeCycleType, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], Macro
|
|
904
|
+
guard<const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], BasePath>, Metadata['schema']>, const Type extends LifeCycleType, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], NoInfer<Macro>>>(hook: {
|
|
905
905
|
as: Type;
|
|
906
906
|
} & LocalHook<LocalSchema, Schema, Singleton & {
|
|
907
907
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
908
908
|
resolve: Ephemeral['resolve'] & Volatile['resolve'];
|
|
909
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>): Type extends 'global' ? Elysia<BasePath, {
|
|
909
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'] | 'as', keyof Metadata['parser'] & string>): Type extends 'global' ? Elysia<BasePath, {
|
|
910
910
|
decorator: Singleton['decorator'];
|
|
911
911
|
store: Singleton['store'];
|
|
912
912
|
derive: Singleton['derive'];
|
|
@@ -925,15 +925,15 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
925
925
|
resolve: Prettify<Volatile['resolve'] & MacroContext>;
|
|
926
926
|
schema: Prettify<MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox']>, Metadata['schema'] & Ephemeral['schema'] & Volatile['schema']>>;
|
|
927
927
|
}>;
|
|
928
|
-
guard<const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], BasePath>, Metadata['schema']>, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], Macro
|
|
928
|
+
guard<const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], BasePath>, Metadata['schema']>, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], NoInfer<Macro>>>(hook: LocalHook<LocalSchema, Schema, Singleton & {
|
|
929
929
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
930
930
|
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroContext;
|
|
931
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes, Ephemeral, {
|
|
931
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes, Ephemeral, {
|
|
932
932
|
derive: Volatile['derive'];
|
|
933
933
|
resolve: Prettify<Volatile['resolve'] & MacroContext>;
|
|
934
934
|
schema: Prettify<MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], BasePath>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>>;
|
|
935
935
|
}>;
|
|
936
|
-
guard<const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const NewElysia extends AnyElysia, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], BasePath>, Metadata['schema']>, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], Macro
|
|
936
|
+
guard<const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const NewElysia extends AnyElysia, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], BasePath>, Metadata['schema']>, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], NoInfer<Macro>>>(run: (group: Elysia<BasePath, {
|
|
937
937
|
decorator: Singleton['decorator'];
|
|
938
938
|
store: Singleton['store'];
|
|
939
939
|
derive: Singleton['derive'];
|
|
@@ -944,10 +944,10 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
944
944
|
macroFn: Metadata['macroFn'];
|
|
945
945
|
parser: Metadata['parser'];
|
|
946
946
|
}, {}, Ephemeral, Volatile>) => NewElysia): Elysia<BasePath, Singleton, Definitions, Metadata, Prettify<Routes & NewElysia['_routes']>, Ephemeral, Volatile>;
|
|
947
|
-
guard<const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const NewElysia extends AnyElysia, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], BasePath>, Metadata['schema']>, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], Macro
|
|
947
|
+
guard<const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const NewElysia extends AnyElysia, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], BasePath>, Metadata['schema']>, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], NoInfer<Macro>>>(schema: LocalHook<LocalSchema, Schema, Singleton & {
|
|
948
948
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
949
949
|
resolve: Ephemeral['resolve'] & Volatile['resolve'];
|
|
950
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>, run: (group: Elysia<BasePath, {
|
|
950
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string>, run: (group: Elysia<BasePath, {
|
|
951
951
|
decorator: Singleton['decorator'];
|
|
952
952
|
store: Singleton['store'];
|
|
953
953
|
derive: Singleton['derive'];
|
|
@@ -1037,11 +1037,11 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
1037
1037
|
*/
|
|
1038
1038
|
get<const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const Handle extends InlineHandler<Schema, Singleton & {
|
|
1039
1039
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1040
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1040
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1041
1041
|
}, JoinPath<BasePath, Path>>>(path: Path, handler: Handle, hook?: LocalHook<LocalSchema, Schema, Singleton & {
|
|
1042
1042
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1043
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1044
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1043
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1044
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1045
1045
|
get: {
|
|
1046
1046
|
body: Schema['body'];
|
|
1047
1047
|
params: undefined extends Schema['params'] ? ResolvePath<Path> : Schema['params'];
|
|
@@ -1068,11 +1068,11 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
1068
1068
|
*/
|
|
1069
1069
|
post<const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const Handle extends InlineHandler<Schema, Singleton & {
|
|
1070
1070
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1071
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1071
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1072
1072
|
}, JoinPath<BasePath, Path>>>(path: Path, handler: Handle, hook?: LocalHook<LocalSchema, Schema, Singleton & {
|
|
1073
1073
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1074
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1075
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1074
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1075
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1076
1076
|
post: {
|
|
1077
1077
|
body: Schema['body'];
|
|
1078
1078
|
params: undefined extends Schema['params'] ? ResolvePath<Path> : Schema['params'];
|
|
@@ -1099,11 +1099,11 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
1099
1099
|
*/
|
|
1100
1100
|
put<const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const Handle extends InlineHandler<Schema, Singleton & {
|
|
1101
1101
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1102
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1102
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1103
1103
|
}, JoinPath<BasePath, Path>>>(path: Path, handler: Handle, hook?: LocalHook<LocalSchema, Schema, Singleton & {
|
|
1104
1104
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1105
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1106
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1105
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1106
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1107
1107
|
put: {
|
|
1108
1108
|
body: Schema['body'];
|
|
1109
1109
|
params: undefined extends Schema['params'] ? ResolvePath<Path> : Schema['params'];
|
|
@@ -1130,11 +1130,11 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
1130
1130
|
*/
|
|
1131
1131
|
patch<const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const Handle extends InlineHandler<Schema, Singleton & {
|
|
1132
1132
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1133
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1133
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1134
1134
|
}, JoinPath<BasePath, Path>>>(path: Path, handler: Handle, hook?: LocalHook<LocalSchema, Schema, Singleton & {
|
|
1135
1135
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1136
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1137
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1136
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1137
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1138
1138
|
patch: {
|
|
1139
1139
|
body: Schema['body'];
|
|
1140
1140
|
params: undefined extends Schema['params'] ? ResolvePath<Path> : Schema['params'];
|
|
@@ -1161,11 +1161,11 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
1161
1161
|
*/
|
|
1162
1162
|
delete<const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const Handle extends InlineHandler<Schema, Singleton & {
|
|
1163
1163
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1164
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1164
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1165
1165
|
}, JoinPath<BasePath, Path>>>(path: Path, handler: Handle, hook?: LocalHook<LocalSchema, Schema, Singleton & {
|
|
1166
1166
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1167
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1168
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1167
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1168
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1169
1169
|
delete: {
|
|
1170
1170
|
body: Schema['body'];
|
|
1171
1171
|
params: undefined extends Schema['params'] ? ResolvePath<Path> : Schema['params'];
|
|
@@ -1192,11 +1192,11 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
1192
1192
|
*/
|
|
1193
1193
|
options<const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const Handle extends InlineHandler<Schema, Singleton & {
|
|
1194
1194
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1195
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1195
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1196
1196
|
}, JoinPath<BasePath, Path>>>(path: Path, handler: Handle, hook?: LocalHook<LocalSchema, Schema, Singleton & {
|
|
1197
1197
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1198
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1199
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1198
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1199
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1200
1200
|
options: {
|
|
1201
1201
|
body: Schema['body'];
|
|
1202
1202
|
params: undefined extends Schema['params'] ? ResolvePath<Path> : Schema['params'];
|
|
@@ -1223,11 +1223,11 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
1223
1223
|
*/
|
|
1224
1224
|
all<const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const Handle extends InlineHandler<Schema, Singleton & {
|
|
1225
1225
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1226
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1226
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1227
1227
|
}, JoinPath<BasePath, Path>>>(path: Path, handler: Handle, hook?: LocalHook<LocalSchema, Schema, Singleton & {
|
|
1228
1228
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1229
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1230
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1229
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1230
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1231
1231
|
[method in string]: {
|
|
1232
1232
|
body: Schema['body'];
|
|
1233
1233
|
params: undefined extends Schema['params'] ? ResolvePath<Path> : Schema['params'];
|
|
@@ -1254,11 +1254,11 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
1254
1254
|
*/
|
|
1255
1255
|
head<const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const Handle extends InlineHandler<Schema, Singleton & {
|
|
1256
1256
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1257
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1257
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1258
1258
|
}, JoinPath<BasePath, Path>>>(path: Path, handler: Handle, hook?: LocalHook<LocalSchema, Schema, Singleton & {
|
|
1259
1259
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1260
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1261
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1260
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1261
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1262
1262
|
head: {
|
|
1263
1263
|
body: Schema['body'];
|
|
1264
1264
|
params: undefined extends Schema['params'] ? ResolvePath<Path> : Schema['params'];
|
|
@@ -1285,11 +1285,11 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
1285
1285
|
*/
|
|
1286
1286
|
connect<const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const Handle extends InlineHandler<Schema, Singleton & {
|
|
1287
1287
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1288
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1288
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1289
1289
|
}, JoinPath<BasePath, Path>>>(path: Path, handler: Handle, hook?: LocalHook<LocalSchema, Schema, Singleton & {
|
|
1290
1290
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1291
|
-
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], Macro
|
|
1292
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1291
|
+
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroToContext<Metadata['macroFn'], NoInfer<Macro>>;
|
|
1292
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1293
1293
|
connect: {
|
|
1294
1294
|
body: Schema['body'];
|
|
1295
1295
|
params: undefined extends Schema['params'] ? ResolvePath<Path> : Schema['params'];
|
|
@@ -1314,13 +1314,13 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
1314
1314
|
* })
|
|
1315
1315
|
* ```
|
|
1316
1316
|
*/
|
|
1317
|
-
route<const Method extends HTTPMethod, const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], Macro
|
|
1317
|
+
route<const Method extends HTTPMethod, const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], NoInfer<Macro>>, const Handle extends InlineHandler<Schema, Singleton & {
|
|
1318
1318
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1319
1319
|
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroContext;
|
|
1320
1320
|
}, JoinPath<BasePath, Path>>>(method: Method, path: Path, handler: Handle, hook?: LocalHook<LocalSchema, Schema, Singleton & {
|
|
1321
1321
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1322
1322
|
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroContext;
|
|
1323
|
-
}, Definitions['error'], Macro, keyof Metadata['parser'] & string> & {
|
|
1323
|
+
}, Definitions['error'], Macro, keyof Metadata['macro'], keyof Metadata['parser'] & string> & {
|
|
1324
1324
|
config: {
|
|
1325
1325
|
allowMeta?: boolean;
|
|
1326
1326
|
};
|
|
@@ -1350,10 +1350,10 @@ export default class Elysia<const in out BasePath extends string = '', const in
|
|
|
1350
1350
|
* })
|
|
1351
1351
|
* ```
|
|
1352
1352
|
*/
|
|
1353
|
-
ws<const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], Macro
|
|
1353
|
+
ws<const Path extends string, const LocalSchema extends InputSchema<keyof UnwrapTypeModule<Definitions['typebox']> & string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['typebox'], JoinPath<BasePath, Path>>, MergeSchema<Volatile['schema'], MergeSchema<Ephemeral['schema'], Metadata['schema']>>>, const Macro extends Metadata['macro'], const MacroContext extends MacroToContext<Metadata['macroFn'], NoInfer<Macro>>>(path: Path, options: WSLocalHook<LocalSchema, Schema, Singleton & {
|
|
1354
1354
|
derive: Ephemeral['derive'] & Volatile['derive'];
|
|
1355
1355
|
resolve: Ephemeral['resolve'] & Volatile['resolve'] & MacroContext;
|
|
1356
|
-
}, Macro>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1356
|
+
}, Macro, keyof Macro>): Elysia<BasePath, Singleton, Definitions, Metadata, Routes & CreateEden<JoinPath<BasePath, Path>, {
|
|
1357
1357
|
subscribe: {
|
|
1358
1358
|
body: Schema['body'];
|
|
1359
1359
|
params: undefined extends Schema['params'] ? ResolvePath<Path> : Schema['params'];
|