5
5
How to use:
6
6
7
7
import express3 = module("express3");
8
- var express:() => express3.Application = require('express');
9
- var app = express();
8
+ var express:any = require('express');
9
+ var app:express3.Application = express();
10
10
11
11
*/
12
12
13
13
declare module "express3" {
14
14
//declare function callHack(): app;
15
15
16
- interface Application {
16
+ //export var app: Application;
17
+
18
+ interface Application extends Function {
17
19
set ( name : String , value :any ) :any ;
18
20
get ( name : String ) :any ;
19
21
@@ -49,8 +51,8 @@ declare module "express3" {
49
51
use ( item : ( req : Request , res : Response , next ?: Function ) => void ) : Application ;
50
52
51
53
// connect Middlewares:
52
- static ( path : String ) : ( req : Request , res : Response , next ?: Function ) => void ;
53
- favicon ( ) : ( req : Request , res : Response , next ?: Function ) => void ;
54
+ // static(path: String): (req: Request, res: Response, next?: Function) => void;
55
+ // favicon(): (req: Request, res: Response, next?: Function) => void;
54
56
}
55
57
56
58
interface Request {
@@ -144,7 +146,7 @@ declare module "express3" {
144
146
locals : Object ;
145
147
146
148
render ( view : String , callback : ( err , html : String ) => void ) ;
147
- render ( view : String , locals : Object , callback : ( err , html : String ) => void ) ;
149
+ render ( view : String , locals : Object , callback ? : ( err , html : String ) => void ) ;
148
150
}
149
151
150
152
interface ResponseSendfileOptions {
@@ -165,6 +167,6 @@ declare module "express3" {
165
167
166
168
declare module "http" {
167
169
import express3 = module ( "express3" ) ;
168
-
169
- export function createServer ( app : express3 . Application ) : Server ;
170
+
171
+ export function createServer ( app : any ) : Server ;
170
172
}
0 commit comments