[@types/jsonwebtoken]: types not reflect cjs export #65458
Unanswered
trim21
asked this question in
Issues with a @types package
Replies: 2 comments 1 reply
-
Thanks for the discussion about "jsonwebtoken", some useful links for everyone: Pinging the DT module owners: @SomaticIT, @danielheim, @brikou, @vpk, @GeneralistDev, @kettil, @RunAge, @nflaig, @LinusU, @ivansieder, @peterblazejewicz, @nandi95. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@trim21 yes, there is no 1-to-1 pattern matched here, but exports are matching module exports, as the results there is no real difference when consuming the types. What's the problem you have with this DT definition? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://github.com/auth0/node-jsonwebtoken/blob/master/index.js
https://github.com/trim21/DefinitelyTyped/blob/53a5a31dcf843ccde716b4a1a498f7b0fc6de62e/types/jsonwebtoken/index.d.ts#L251-L253
we should use a
export =
hereBut there are also some types packages import types from this package
jsonwebtoken
So looks like we don't have a correct way to write types for this package?
I try to export namespace, but it's skill valid to
import * as jwt from 'jsonwebtoken';jwt.sign(...)
looks like this can be fixed by auth0/node-jsonwebtoken#884
Beta Was this translation helpful? Give feedback.
All reactions