elysia 1.0.8 → 1.0.9

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.
@@ -7,6 +7,7 @@ import { Memoirist } from 'memoirist';
7
7
  import { type Static, type TSchema } from '@sinclair/typebox';
8
8
  import type { Context } from './context';
9
9
  import { t } from './type-system';
10
+ import { type Sucrose } from './sucrose';
10
11
  import type { WS } from './ws/types';
11
12
  import { type DynamicHandler } from './dynamic-handle';
12
13
  import type { ElysiaConfig, SingletonBase, DefinitionBase, ComposedHandler, InputSchema, LocalHook, MergeSchema, RouteSchema, UnwrapRoute, InternalRoute, HTTPMethod, SchemaValidator, VoidHandler, PreHandler, BodyHandler, OptionalHandler, AfterHandler, ErrorHandler, LifeCycleStore, MaybePromise, Prettify, Prettify2, ListenCallback, AddPrefix, AddSuffix, AddPrefixCapitalize, AddSuffixCapitalize, TraceHandler, MaybeArray, GracefulHandler, GetPathParameter, MapResponse, MacroManager, BaseMacro, MacroToProperty, TransformHandler, MetadataBase, RouteBase, CreateEden, ComposeElysiaResponse, InlineHandler, HookContainer, LifeCycleType, MacroQueue, EphemeralType, ExcludeElysiaResponse } from './types';
@@ -94,27 +95,8 @@ export default class Elysia<const in out BasePath extends string = '', const in
94
95
  history: InternalRoute[];
95
96
  };
96
97
  protected inference: {
97
- readonly event: {
98
- readonly body: false;
99
- readonly cookie: false;
100
- readonly headers: false;
101
- readonly queries: [];
102
- readonly query: false;
103
- readonly set: false;
104
- readonly unknownQueries: false;
105
- };
106
- readonly trace: {
107
- readonly request: false;
108
- readonly parse: false;
109
- readonly transform: false;
110
- readonly handle: false;
111
- readonly beforeHandle: false;
112
- readonly afterHandle: false;
113
- readonly error: false;
114
- readonly context: false;
115
- readonly store: false;
116
- readonly set: false;
117
- };
98
+ event: Sucrose.Inference;
99
+ trace: Sucrose.TraceInference;
118
100
  };
119
101
  private promisedModules;
120
102
  constructor(config?: ElysiaConfig<BasePath, Scoped>);
@@ -1430,5 +1412,5 @@ export { Cookie, type CookieOptions } from './cookies';
1430
1412
  export { getSchemaValidator, mergeHook, mergeObjectArray, getResponseSchemaValidator, StatusMap, InvertedStatusMap } from './utils';
1431
1413
  export { error, ParseError, NotFoundError, ValidationError, InternalServerError, InvalidCookieSignature, ERROR_CODE, ELYSIA_RESPONSE } from './error';
1432
1414
  export type { Context, PreContext } from './context';
1433
- export type { EphemeralType, CreateEden, ComposeElysiaResponse, ElysiaConfig, SingletonBase, DefinitionBase, RouteBase, Handler, ComposedHandler, InputSchema, LocalHook, MergeSchema, RouteSchema, UnwrapRoute, InternalRoute, HTTPMethod, SchemaValidator, VoidHandler, PreHandler, BodyHandler, OptionalHandler, ErrorHandler, AfterHandler, LifeCycleEvent, TraceEvent, LifeCycleStore, LifeCycleType, MaybePromise, ListenCallback, UnwrapSchema, TraceHandler, TraceProcess, TraceReporter, TraceStream, Checksum } from './types';
1415
+ export type { EphemeralType, CreateEden, ComposeElysiaResponse, ElysiaConfig, SingletonBase, DefinitionBase, RouteBase, Handler, ComposedHandler, InputSchema, LocalHook, MergeSchema, RouteSchema, UnwrapRoute, InternalRoute, HTTPMethod, SchemaValidator, VoidHandler, PreHandler, BodyHandler, OptionalHandler, ErrorHandler, AfterHandler, LifeCycleEvent, TraceEvent, LifeCycleStore, LifeCycleType, MaybePromise, ListenCallback, UnwrapSchema, TraceHandler, TraceProcess, TraceReporter, TraceStream, Checksum, DocumentDecoration } from './types';
1434
1416
  export type { Static, TSchema } from '@sinclair/typebox';