almost working

This commit is contained in:
Sean Clark Hess
2012-11-14 11:12:24 -07:00
parent 8534b4c0a8
commit c2113e5fc0
2 changed files with 20 additions and 12 deletions

View File

@@ -93,13 +93,21 @@ declare module _express {
listen(handle: any, listeningListener?: Function): void;
get(name: string): any;
get(path: string, handler: (req: ServerRequest, res: ServerResponse) => void ): void;
get(path: RegExp, handler: (req: ServerRequest, res: ServerResponse) => void ): void;
get(path: string, callbacks: any, callback: () => void ): void;
get(path: string, handler: Handler ): void;
get(path: RegExp, handler: Handler ): void;
get(path: string, ...callbacks: Handler[]): void;
post(path: string, handler: (req: ServerRequest, res: ServerResponse) => void ): void;
post(path: RegExp, handler: (req: ServerRequest, res: ServerResponse) => void ): void;
post(path: string, callbacks: any, callback: () => void ): void;
post(path: string, handler: Handler ): void;
post(path: RegExp, handler: Handler ): void;
post(path: string, ...callbacks: Handler[]): void;
put(path: string, handler: Handler ): void;
put(path: RegExp, handler: Handler ): void;
put(path: string, ...callbacks: Handler[]): void;
del(path: string, handler: Handler ): void;
del(path: RegExp, handler: Handler ): void;
del(path: string, ...callbacks: Handler[]): void;
}
export interface ServerRequest extends http.ServerRequest {
@@ -197,11 +205,6 @@ declare module _express {
}
declare module "express" {
export interface ServerApplication extends _express.ServerApplication {}
export interface ServerRequest extends _express.ServerRequest {}
export interface ServerResponse extends _express.ServerResponse {}
export interface Handler extends _express.Handler {}
export function (): _express.ServerApplication;
export function createServer(): ServerApplication;
export function static(path: string): any;
@@ -211,4 +214,9 @@ declare module "express" {
export function bodyParser(options?: any): Handler;
export function errorHandler(opts?: any): Handler;
export function methodOverride(): Handler;
export interface ServerApplication extends _express.ServerApplication {}
export interface ServerRequest extends _express.ServerRequest {}
export interface ServerResponse extends _express.ServerResponse {}
export interface Handler extends _express.Handler {}
}

View File

@@ -238,4 +238,4 @@ function test_middleware() {
app.use(express.cookieSession());
app.use(express.directory('public'));
app.use(express.static('public'));
}
}