API reference
Namespaces
Section titled “Namespaces”| Namespace | Description |
|---|---|
| prefix | - |
Classes
Section titled “Classes”| Class | Description |
|---|---|
| Compiled | - |
| Elysia | - |
| ElysiaError | - |
| ElysiaFile | - |
| ElysiaStatus | - |
| HTTPError | Self-describing HTTP error |
| InternalServerError | - |
| InvalidCookie | - |
| MultiValidator | - |
| NotFound | - |
| ParseError | - |
| StandardValidator | - |
| TypeBoxValidator | - |
| ValidationError | - |
| Validator | - |
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| AotFingerprint | - |
| BaseCookie | - |
| BaseSchema | - |
| CompilerSession | - |
| Cookie | - |
| CookieOptions | - |
| DefaultEphemeral | - |
| DefaultMetadata | - |
| DefaultSingleton | - |
| InputSchema | - |
| Macro | - |
| MacroTypeLambda | Type-level lambda applied to a macro’s per call site hook value |
| ProgramId | - |
| RouteSchema | - |
| StandardJSONSchemaV1Like | - |
| StandardSchemaV1Like | - |
| TCookieField | - |
| TCookieObject | - |
| UnwrapRoute | - |
Type Aliases
Section titled “Type Aliases”| Type Alias | Description |
|---|---|
| AnyElysia | - |
| AnySchema | - |
| Context | - |
| ErrorContext | - |
| FileTypeDetector | - |
| HTTPHeaders | - |
| MacroToContext | - |
| MacroToProperty | - |
| NumericStatus | Numeric form of a status name or code. |
| Problem | RFC 9457 Problem Details shape. |
| redirect | - |
| SelectiveProblem | - |
| SelectiveStatus | - |
| Server | - |
| SSEPayload | - |
| StatusMap | - |
| StatusMapBack | - |
| StatusResponse | Default body for a status with no response. Named to keep emitted types small. |
| TaggedHTTPError | Class returned by HTTPError.id |
| TFiles | - |
| UnwrapModels | - |
| UnwrapSchema | - |
| ValidationErrorResponse | Request validation problem. Diagnostic fields are development-only. |
Variables
Section titled “Variables”| Variable | Description |
|---|---|
| env | - |
| file | Serve a file from a path as the response. |
| form | Return a multipart/form-data response. |
| macroType | - |
| Manifest | - |
| redirect | - |
| sse | - |
| status | - |
| StatusMap | - |
| StatusMapBack | - |
| t | - |
| TypeSystem | typebox/system is a subgraph of typebox/type, so a static re-export here would pin ~231 KB of the deferral back into the eager graph. The proxy also guarantees Elysia’s own Settings default lands BEFORE the namespace is handed out, keeping a user’s explicit TypeSystem.Settings.Set(...) last — the ordering the eager setupTypebox() used to provide |
| validationDetail | Wrap a string into a TypeBox error callback that overrides the default validation message. Use as t.Number({ error: validationDetail('x must be a number') }). |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| borrow | - |
| bytes | Certify a byte stream for direct Response body pass-through. |
| createBaseContext | - |
| createContext | - |
| fileType | - |
| inAotBuild | - |
| prefix | - |
| problem | RFC 9457 Problem Details function |
| setFileTypeDetector | - |
| setupTypebox | - |
References
Section titled “References”default
Section titled “default”Renames and re-exports Elysia