Skip to content

Commit

Permalink
fix(cors): replace Handler w/ explicit signature type
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Apr 1, 2021
1 parent 13c27bf commit 9eee191
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cors.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Handler } from 'worktop';
import type { ServerRequest } from 'worktop/request';
import type { ServerResponse } from 'worktop/response';

export interface Config {
Expand Down Expand Up @@ -68,4 +68,4 @@ type PreflightConfig = Omit<Config, 'origin'> & {
* Apply all CORS headers (see `headers` export)
* Will also handle preflight (aka, OPTIONS) requests.
*/
export function preflight(options?: PreflightConfig): Handler;
export function preflight(options?: PreflightConfig): (req: ServerRequest, res: ServerResponse) => void;

0 comments on commit 9eee191

Please sign in to comment.