mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-23 02:20:02 +00:00
Merge pull request #1822 from santialbo/restify-cors
Adds missing method CORS on restify type definition
This commit is contained in:
12
restify/restify.d.ts
vendored
12
restify/restify.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user