-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as Express from 'express'; | ||
export interface IRoute<TRequest extends Express.Request, TResponse extends Express.Response> { | ||
readonly path: string; | ||
use(...handler: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
get(...handler: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
post(...handler: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
patch(...handler: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
put(...handler: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
delete(...handler: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
handlers: { | ||
[method: string]: Express.RequestHandler[]; | ||
}; | ||
} | ||
export declare class Route<TRequest extends Express.Request, TResponse extends Express.Response> implements IRoute<TRequest, TResponse> { | ||
readonly path: string; | ||
private _handlers; | ||
constructor(path: string); | ||
readonly handlers: { | ||
[index: string]: ((req: TRequest, res: TResponse, next?: Express.NextFunction) => void)[]; | ||
}; | ||
use(...handlers: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
get(...handlers: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
post(...handlers: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
patch(...handlers: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
put(...handlers: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
delete(...handlers: Array<(req: TRequest, res: TResponse, next?: Express.NextFunction) => any>): this; | ||
private handle; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as Express from 'express'; | ||
import { IRoute } from './route'; | ||
export declare class Router<TRequest extends Express.Request, TResponse extends Express.Response> { | ||
private _stack; | ||
private _extendRequest; | ||
private _extendResponse; | ||
private _handler; | ||
constructor(extendRequest: (req: Request) => TRequest, extendResponse: (req: Response) => TResponse); | ||
constructor(handler?: (req: Request, res: Response, next?: Express.NextFunction) => void); | ||
route(path: string): IRoute<TRequest, TResponse>; | ||
getRouter(): Express.Router; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { Router as CoreRouter, Request, Response } from 'express'; | ||
import { Router } from './express/router'; | ||
export default Router; | ||
export { Router, CoreRouter, Request, Response }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export declare class Model<T extends Model<T>> { | ||
private ctor; | ||
constructor(ctor: { | ||
new (...args: any[]): T; | ||
}); | ||
protected convert(source: Partial<T>, ...constructorArgs: any[]): T; | ||
protected static convert<T extends Model<T>>(source: Partial<T>, ...constructorArgs: any[]): T; | ||
protected static convert<T extends Model<T>>(source: Partial<T>, ctor: { | ||
new (...args: any[]): T; | ||
}, ...constructorArgs: any[]): T; | ||
assign(properties: Partial<T>, ...ignoreProperties: string[]): void; | ||
protected convertNumber(value: any, defaultValue?: number): number; | ||
private static isClass; | ||
private static apply; | ||
toJSON(): any; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |