Skip to content

Commit e9bbd8f

Browse files
committed
Fixed optional arg issue
1 parent b29fb02 commit e9bbd8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jsonwebtoken/jsonwebtoken.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ declare module "jsonwebtoken" {
6767
* @param {SignOptions} [options] - Options for the signature
6868
* @param {Function} callback - Callback to get the encoded token on
6969
*/
70-
export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, options?: SignOptions, callback: SignCallback): void;
70+
export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, callback: SignCallback): void;
71+
export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, options: SignOptions, callback: SignCallback): void;
7172

7273
/**
7374
* Synchronously verify given token using a secret or a public key to get a decoded token

0 commit comments

Comments
 (0)