Merge pull request #1822 from santialbo/restify-cors

Adds missing method CORS on restify type definition
This commit is contained in:
Masahiro Wakame
2014-03-15 18:06:32 +09:00

12
restify/restify.d.ts vendored
View File

@@ -160,6 +160,17 @@ declare module "restify" {
(req: Request, res: Response, next: Next): any;
}
interface CORS {
(cors?: {
origins?: string[];
credentials?: boolean;
headers?: string[];
}): RequestHandler;
origins: string[];
ALLOW_HEADERS: string[];
credentials: boolean;
}
export function createServer(options?: ServerOptions): Server;
export function createJsonClient(options?: ClientOptions): Client;
@@ -199,4 +210,5 @@ declare module "restify" {
export function auditLogger(options?: Object): Function;
export function fullResponse(): RequestHandler;
export var defaultResponseHeaders : any;
export var CORS: CORS;
}