New function param for .sign break typescript check

Author: EmanuelPintoAddictionCreated Jan 24, 2025Updated Mar 15, 2026

Hi there, I found out that after v9.0.6 of @types/jsonwebtoken, typescipt warn me about the .sign function when I try to use the function with these parameters: .sign(payload, key, { algorithm: 'RS256', expiresIn: TTL, header: { kid: jwk.kid, alg: 'RS256' }, })

In this case it seems to take the signature for the async function and throws me an error

Source: DefinitelyTyped/DefinitelyTyped