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

Add short descriptions to TypeScript types #1147

Closed
usernamehw opened this issue Oct 17, 2020 · 2 comments · Fixed by #1148
Closed

Add short descriptions to TypeScript types #1147

usernamehw opened this issue Oct 17, 2020 · 2 comments · Fixed by #1148
Labels
enhancement New feature or request good first issue Good for newcomers released

Comments

@usernamehw
Copy link
Contributor

This library has built-in types for TypeScript https://github.com/iamkun/dayjs/blob/b342bd3d84987d6c7587a0c4590d614fb0e670d7/types/index.d.ts and that's great.

Would it be possible to create a short description for every function, perhaps with examples like input->output and links to documentation.

Example:

class Dayjs {
    /**
     * Returns a cloned Day.js object with a specified amount of time added.
     * @example
     * ```
     * dayjs().add(7, 'day')
     * ```
     * Docs: https://day.js.org/docs/en/manipulate/add
     */
    add(value: number, unit: OpUnitType): Dayjs
}
@iamkun
Copy link
Owner

iamkun commented Oct 18, 2020

That sounds cool. Would you like to give it a try?

@iamkun iamkun added enhancement New feature or request good first issue Good for newcomers labels Oct 18, 2020
@iamkun
Copy link
Owner

iamkun commented Oct 23, 2020

🎉 This issue has been resolved in version 1.9.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants