Skip to content

Commit

Permalink
Fix type def for getSigningKey (#236)
Browse files Browse the repository at this point in the history
kid can be undefined or null for `getSigningKey` with callback, its completely optional when using the promise, this fixes the type definition
  • Loading branch information
davidpatrick authored Mar 22, 2021
1 parent 2233ec8 commit f5270dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ declare namespace JwksRsa {

getKeys(): Promise<unknown>;
getSigningKeys(): Promise<SigningKey[]>;
getSigningKey(kid: string): Promise<SigningKey>;
getSigningKey(kid: string, cb: (err: Error | null, key: SigningKey) => void): void;
getSigningKey(kid?: string | null | undefined): Promise<SigningKey>;
getSigningKey(kid: string | null | undefined, cb: (err: Error | null, key: SigningKey) => void): void;
}

interface Headers {
Expand Down

0 comments on commit f5270dd

Please sign in to comment.