Skip to content

fix: correct JSDoc parameter type in Authenticator.prototype.use#1053

Open
AkaHarshit wants to merge 1 commit intojaredhanson:masterfrom
AkaHarshit:fix/correct-use-jsdoc
Open

fix: correct JSDoc parameter type in Authenticator.prototype.use#1053
AkaHarshit wants to merge 1 commit intojaredhanson:masterfrom
AkaHarshit:fix/correct-use-jsdoc

Conversation

@AkaHarshit
Copy link
Copy Markdown

Problem
Authenticator.prototype.use has an incorrect JSDoc parameter type for strategy. This causes editors that support type inference from JSDoc to fail parsing function calls properly when the second argument is not provided.

Solution
Updated the JSDoc parameter type from @param {Strategy} strategy to @param {Strategy|undefined} strategy to correctly reflect the implementation which allows strategy as the first argument.

Testing
Passed the existing npm test suite to avoid any regressions since this is a documentation comment change.

Linked Issue
Fixes: #896

Improve type inference by allowing undefined strategy.

Fixes: jaredhanson#896
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Authenticator.prototype.use has incorrect JSDoc

1 participant