Add types/jsonwebtokens-promisified#25038
Add types/jsonwebtokens-promisified#25038RyanCavanaugh merged 3 commits intoDefinitelyTyped:masterfrom
Conversation
|
@aneilbaboo Thank you for submitting this PR! Because this is a new definition, a DefinitelyTyped maintainer will be reviewing this PR in the next few days once the Travis CI build passes. In the meantime, if the build fails or a merge conflict occurs, I'll let you know. Have a nice day! |
| /types/jsontoxml/ @benstevens48 | ||
| /types/jsonwebtoken/ @SomaticIT @danielheim @brikou | ||
| /types/jsonwebtoken-promisified @aneilbaboo | ||
| /types/jspdf/ @amberjs |
There was a problem hiding this comment.
Not a problem but FYI you don't need to modify this file yourself - it is supposed to be auto-generated
| @@ -0,0 +1,79 @@ | |||
| { | |||
| "extends": "dtslint/dt.json", | |||
| "rules": { | |||
There was a problem hiding this comment.
I need some justification for why you've disabled all the lint rules. We have them all in place for a reason.
There was a problem hiding this comment.
I see what you mean. I copied the tsconfig from types/jsonwebtoken.
There was a problem hiding this comment.
Thanks for catching that. The linting caught a lot of stupid stuff. I'm fixing it.
I looked at some of the nearby folders, and noticed ~50% of them have the same tsconfig. I suspect DefinitelyTyped is littered with this bad pattern.
E.g,: jsonnet, jsonpath jsonstream, jspdf, jsrender
There was a problem hiding this comment.
Ah, I see what's happening. The javascript has function signatures that aren't easily matched by typescript rules. I believe the underlying library must be doing runtime inspection of arguments. So enabling the linting rules creates a bunch of errors.
|
@aneilbaboo One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you! |
|
@RyanCavanaugh, Removed the tslint ignores and resulting issues |
|
🔔 @RyanCavanaugh - Thanks for your review of this PR! Can you please look at the new code and update your review status if appropriate? |
Overview
The
jsonwebtoken-promisifiednpm module adds a couple of methods:verifySyncanddecodeSync. This new declaration covers the methods ofjsonwebtokenand adds these extra promise-returning methods.Checklist
npm test.)npm run lint package-name(ortscif notslint.jsonis present).Select one of these and delete the others:
If adding a new definition:
.d.tsfiles generated via--declarationdts-gen --dt, not by basing it on an existing project.tslint.jsonshould be present, andtsconfig.jsonshould havenoImplicitAny,noImplicitThis,strictNullChecks, andstrictFunctionTypesset totrue.