Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: improve jsdoc types #69

Open
wants to merge 4 commits into
base: elevated_limits_quota_on_params
Choose a base branch
from

Conversation

LeweyM
Copy link

@LeweyM LeweyM commented May 16, 2024

Description

This PR:

  • adds missing jsdoc types to public function arguments and return values.
  • adds some jsdoc types for internal functions.
  • centralizes jsdoc types for use across the project.

The end result is a better user experience (intellisense and documentation for the public interface) and a better developer experience for contributors (type hints for internal functions).

image

image

References

N/A

Testing

N/A

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@LeweyM LeweyM requested a review from a team as a code owner May 16, 2024 14:55
lib/db.js Outdated Show resolved Hide resolved
lib/db.js Outdated Show resolved Hide resolved
lib/utils.js Outdated Show resolved Hide resolved
@@ -1,3 +1,4 @@
/// <reference path="types.js" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: I have not seen this before with jsdocs, what is it doing?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its to reference types defined in another file. like a require for types.

Not sure if this is the best way though.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I had no idea importing them was actually required!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants