UNPKG

lakutata

Version:

An IoC-based universal application framework.

38 lines (33 loc) 1.27 kB
import { BaseContext, ContextType, ContextParams } from './TypeDef.internal.120.js'; import { IncomingMessage, ServerResponse } from 'node:http'; import { ActionPattern } from './TypeDef.internal.100.js'; declare class CLIContext<T extends Record<string, any> = {}> extends BaseContext<T> { readonly type: ContextType; command: string; constructor(params: ContextParams<{ readonly command: string; readonly data: Record<string, any>; }>); } declare class HTTPContext<T extends Record<string, any> = {}> extends BaseContext<T> { readonly type: ContextType; readonly route: string; readonly method: string; readonly request: IncomingMessage; readonly response: ServerResponse; constructor(params: ContextParams<{ readonly route: string; readonly method: string; readonly request: IncomingMessage; readonly response: ServerResponse; readonly data: Record<string, any>; }>); } declare class ServiceContext<T extends Record<string, any> = {}> extends BaseContext<T> { readonly type: ContextType; input: ActionPattern<T>; constructor(params: ContextParams<{ readonly data: ActionPattern; }>); } export { CLIContext, HTTPContext, ServiceContext };