Skip to content

Commit

Permalink
Fix typescript build
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <[email protected]>
  • Loading branch information
mcollina committed Sep 10, 2024
1 parent ada5407 commit 95daa60
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 12 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import { type FastifyJWTOptions, type VerifyPayloadType } from '@fastify/jwt'
import { type FastifyPluginCallback, type FastifyReply, type FastifyRequest } from 'fastify'
import { type GetJwksOptions } from 'get-jwks'
import { type URL, type UrlObject } from 'url'

// Copied over to avoid TypeScript compilation errors
// https://github.com/nearform/get-jwks/issues/309
type GetJwksOptions = {
max?: number
ttl?: number
issuersWhitelist?: string[]
providerDiscovery?: boolean
jwksPath?: string
agent?: Agent
timeout?: number
}

export interface JWTOptions extends FastifyJWTOptions {
namespace?: string
jwks?: boolean | GetJwksOptions
Expand Down
1 change: 0 additions & 1 deletion test/types/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ app.register(async (instance) => {
expectType<CreateWebhookSessionDecorator>(request.createWebhookSession)
})
})

0 comments on commit 95daa60

Please sign in to comment.