29 lines
550 B
TypeScript
29 lines
550 B
TypeScript
declare module '@gm5/core' {
|
|
import { Server } from 'http'
|
|
|
|
interface Middleware {
|
|
(req: Request, res: Response, next: () => void): void
|
|
}
|
|
|
|
interface Installable {
|
|
name: string
|
|
install: (args: any) => any
|
|
}
|
|
|
|
class Five {
|
|
get server(): Server
|
|
|
|
set(obj: object): this
|
|
|
|
get(key: string): any
|
|
|
|
use(middleware: Middleware | Installable, args?: any): this
|
|
|
|
listen(port?: number, callback?: () => void): this
|
|
}
|
|
|
|
export function preload(dir?: string): array
|
|
|
|
export function createApp(conf?: object): Five
|
|
}
|
JavaScript
100%