Skip to content

Commit eebe047

Browse files
authored
Merge pull request #89 from jeremy-daley-kr/fix/types
fix type declarations
2 parents 5659f38 + 4f9e7d4 commit eebe047

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

koa-helmet.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for koa-helmet 6.0
1+
// Type definitions for koa-helmet 7.0
22
// Project: https://github.com/venables/koa-helmet#readme
33
// Definitions by: Nick Simmons <https://github.com/nsimmons>
44
// Jan Dolezel <https://github.com/dolezel>
@@ -11,7 +11,7 @@ import { Middleware, Context } from 'koa';
1111
type HelmetOptions = Required<Parameters<typeof helmet>>[0];
1212

1313
declare namespace koaHelmet {
14-
type KoaHelmetContentSecurityPolicyDirectiveFunction = (ctx: Context) => string;
14+
type KoaHelmetContentSecurityPolicyDirectiveFunction = (req?: Context["req"], res?: Context["res"]) => string;
1515

1616
type KoaHelmetCspDirectiveValue = string | KoaHelmetContentSecurityPolicyDirectiveFunction;
1717

0 commit comments

Comments
 (0)