From e5ce007af582343ca9d207145a1b0732f0d0ee7f Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Thu, 18 May 2017 09:26:36 -0400 Subject: [PATCH] Hide static fields and make CORS a pure function --- types/restify/index.d.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/types/restify/index.d.ts b/types/restify/index.d.ts index 5a6b692570..6074ce8284 100644 --- a/types/restify/index.d.ts +++ b/types/restify/index.d.ts @@ -595,16 +595,13 @@ export function auditLogger(options: { log: any }): (req: Request, res: Response export function fullResponse(): RequestHandler; // tslint:disable-next-line no-var export var defaultResponseHeaders: any; -export const CORS: { - (cors?: { - origins?: string[]; - credentials?: boolean; - headers?: string[]; - }): RequestHandler; - origins: string[]; - ALLOW_HEADERS: string[]; - credentials: boolean; -}; + +export function CORS(options?: CORSOptions): RequestHandler; +export interface CORSOptions { + origins?: string[]; + credentials?: boolean; + headers?: string[]; +} export const pre: { pause(): RequestHandler;