@@ -162,7 +162,8 @@ import type {
162162 EmptyRouteSchema ,
163163 UnknownRouteSchema ,
164164 MaybeFunction ,
165- InlineHandlerNonMacro
165+ InlineHandlerNonMacro ,
166+ Router
166167} from './types'
167168
168169export type AnyElysia = Elysia < any , any , any , any , any , any , any >
@@ -201,7 +202,7 @@ export default class Elysia<
201202 parser : { }
202203 response : { }
203204 } ,
204- const out Routes extends RouteBase = { } ,
205+ const in out Routes extends RouteBase = { } ,
205206 // ? scoped
206207 const in out Ephemeral extends EphemeralType = {
207208 derive : { }
@@ -222,7 +223,7 @@ export default class Elysia<
222223 config : ElysiaConfig < BasePath >
223224
224225 server : Server | null = null
225- private dependencies : { [ key in string ] : Checksum [ ] } = { }
226+ private dependencies : { [ key : string ] : Checksum [ ] } = { }
226227
227228 '~Prefix' = '' as BasePath
228229 '~Singleton' = null as unknown as Singleton
@@ -295,12 +296,7 @@ export default class Elysia<
295296 }
296297
297298 router = {
298- '~http' : undefined as
299- | Memoirist < {
300- compile : Function
301- handler ?: ComposedHandler
302- } >
303- | undefined ,
299+ '~http' : undefined ,
304300 get http ( ) {
305301 if ( ! this [ '~http' ] )
306302 this [ '~http' ] = new Memoirist ( {
@@ -310,7 +306,7 @@ export default class Elysia<
310306
311307 return this [ '~http' ]
312308 } ,
313- '~dynamic' : undefined as Memoirist < DynamicHandler > | undefined ,
309+ '~dynamic' : undefined ,
314310 // Use in non-AOT mode
315311 get dynamic ( ) {
316312 if ( ! this [ '~dynamic' ] )
@@ -321,15 +317,11 @@ export default class Elysia<
321317 return this [ '~dynamic' ]
322318 } ,
323319 // Static Router
324- static : { } as { [ path in string ] : { [ method in string ] : number } } ,
320+ static : { } ,
325321 // Native Static Response
326- response : { } as {
327- [ path : string ] :
328- | MaybePromise < Response | undefined >
329- | { [ method : string ] : MaybePromise < Response | undefined > }
330- } ,
331- history : [ ] as InternalRoute [ ]
332- }
322+ response : { } ,
323+ history : [ ]
324+ } as Router
333325
334326 protected routeTree : Record < string , number > = { }
335327
@@ -365,7 +357,7 @@ export default class Elysia<
365357 return null
366358 }
367359
368- '~parser' : { [ K in string ] : BodyHandler < any , any > } = { }
360+ '~parser' : { [ K : string ] : BodyHandler < any , any > } = { }
369361
370362 private _promisedModules : PromiseGroup | undefined
371363 private get promisedModules ( ) {
@@ -8121,11 +8113,7 @@ export type {
81218113} from './type-system/types'
81228114
81238115export { serializeCookie , Cookie , type CookieOptions } from './cookies'
8124- export type {
8125- Context ,
8126- PreContext ,
8127- ErrorContext
8128- } from './context'
8116+ export type { Context , PreContext , ErrorContext } from './context'
81298117export {
81308118 ELYSIA_TRACE ,
81318119 type TraceEvent ,
0 commit comments