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

Getting parameter types info from JSDoc comments #25

Open
IvanFarkas opened this issue Nov 20, 2021 · 0 comments
Open

Getting parameter types info from JSDoc comments #25

IvanFarkas opened this issue Nov 20, 2021 · 0 comments

Comments

@IvanFarkas
Copy link

Getting parameter types info from JSDoc comments

Is there away to get parameter types info from JSDoc comments?
This would be very powerful.

JavaScript

/**
 * Clamp a number between 2 values.
 *
 * @param {number} value - Value to clamp.
 * @param {number} [min=0] - Minumum value.
 * @param {number} [max=1] - Maximum value.
 *
 * @returns {number}
 */
static clamp(value, min = 0, max = 1) {
  return MathUtils.clamp(value, min, max);
}

TypeScript

/**
 * Clamp a number between 2 values.
 *
 * @param {number} value - Value to clamp.
 * @param {number} [min=0] - Minumum value.
 * @param {number} [max=1] - Maximum value.
 *
 * @returns {number}
 */
static clamp(value: number, min: number = 0, max: number = 1) {
  return MathUtils.clamp(value, min, max);
}
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

No branches or pull requests

1 participant