Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typescript build #305

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -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
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)
})
})