elysia 0.7.3 → 0.7.4

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.
@@ -3,7 +3,7 @@ import type { Serve, Server } from 'bun';
3
3
  import type { Static, TSchema } from '@sinclair/typebox';
4
4
  import type { Context } from './context';
5
5
  import type { WS } from './ws/types';
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 } from './types';
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
7
  /**
8
8
  * ### Elysia Server
9
9
  * Main instance to create web server using Elysia
@@ -57,7 +57,7 @@ export default class Elysia<BasePath extends string = '', Decorators extends Dec
57
57
  * .listen(8080)
58
58
  * ```
59
59
  */
60
- onStart(handler: MaybeArray<PreHandler<ParentSchema, Decorators>>): this;
60
+ onStart(handler: MaybeArray<GracefulHandler<this, Decorators>>): this;
61
61
  /**
62
62
  * ### request | Life cycle event
63
63
  * Called on every new request is accepted
@@ -337,7 +337,7 @@ export default class Elysia<BasePath extends string = '', Decorators extends Dec
337
337
  * })
338
338
  * ```
339
339
  */
340
- onStop(handler: VoidHandler<ParentSchema, Decorators>): this;
340
+ onStop(handler: MaybeArray<GracefulHandler<this, Decorators>>): this;
341
341
  /**
342
342
  * ### on
343
343
  * Syntax sugar for attaching life cycle event by name