miter
Version:
A typescript web framework based on ExpressJs based loosely on SailsJs
31 lines (30 loc) • 1.05 kB
TypeScript
import { CtorT } from '../core/ctor';
import { PolicyT } from '../core/policy';
declare module 'express' {
interface Request {
policyResults<T>(policy: CtorT<PolicyT<T>>): T | undefined;
jwt: any;
requestIndex: number;
routeMethodName: string;
}
interface Response {
sendFile(path: string): Promise<void>;
sendFile(path: string, options: any): Promise<void>;
sendFiles(req: any, path: string): Promise<boolean>;
sendFiles(req: any, path: string, options: any): Promise<boolean>;
sendFile(path: string, fn: {
(err: Error): void;
}): void;
sendFile(path: string, options: any, fn: {
(err: Error): void;
}): void;
sendfile(path: string): Promise<void>;
sendfile(path: string, options: any): Promise<void>;
sendfile(path: string, fn: {
(err: Error): void;
}): void;
sendfile(path: string, options: any, fn: {
(err: Error): void;
}): void;
}
}