diff --git a/index.d.ts b/index.d.ts index 1a931a8..307717c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,8 +1,20 @@ import { type FastifyJWTOptions, type VerifyPayloadType } from '@fastify/jwt' import { type FastifyPluginCallback, type FastifyReply, type FastifyRequest } from 'fastify' -import { type GetJwksOptions } from 'get-jwks' +import { Agent } from 'http' 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 diff --git a/test/types/index.test-d.ts b/test/types/index.test-d.ts index d01200c..da657a6 100644 --- a/test/types/index.test-d.ts +++ b/test/types/index.test-d.ts @@ -26,4 +26,3 @@ app.register(async (instance) => { expectType(request.createWebhookSession) }) }) -