A Node project designed to support native JavaScript-like features for Nepali date and times. It includes features such as 'NepaliDate' for Nepali date support and 'dateConverter' for date conversions.
GNU General Public License v3.0
63
stars
18
forks
source link
feat: constructor overloaded docstring added with type validation #53
Constructor overloading with typescript and examples of each cases are added like in Native Javascript Date constructor in Typescript.
Description
I have introduced Typescript types and examples of each case using constructor overloading and tsdoc examples implementation. It increases readabiloty and usability of the code for end users. It also provides various type safety features.
Related Issue
This PR is related to issue #11
Type of Change
Please mark the appropriate option below to describe the type of change your pull request introduces:
[ ] Bug fix
[ ] New feature
[ ] Enhancement
[ ] Documentation update
[x] Refactor
[ ] Other (please specify)
Checklist
[x] I have used semantic commit messages.
Examples: "fix: Fixed foobar bug", "feat(accounts): Added foobar feature".
[ ] I have added/updated the necessary documentation on README.md.
[ ] I have updated CHANGELOG.md for the significant changes.
[ ] I have added appropriate test cases (if applicable) to ensure the changes are functioning correctly.
[x] My pull request has a clear title and description.
Additional Notes
I have also added some as unknown as boolean in some failing tests too make it typescript error free. Here are some of the changes that a user of the package can see.
By submitting this pull request, I confirm that I have read and complied with the contribution guidelines of this project.
Constructor overloading with typescript and examples of each cases are added like in Native Javascript Date constructor in Typescript.
Description
I have introduced Typescript types and examples of each case using constructor overloading and tsdoc examples implementation. It increases readabiloty and usability of the code for end users. It also provides various type safety features.
Related Issue
This PR is related to issue #11
Type of Change
Please mark the appropriate option below to describe the type of change your pull request introduces:
Checklist
"fix: Fixed foobar bug"
,"feat(accounts): Added foobar feature"
.README.md
.CHANGELOG.md
for the significant changes.Additional Notes
I have also added some
as unknown as boolean
in some failing tests too make it typescript error free. Here are some of the changes that a user of the package can see.By submitting this pull request, I confirm that I have read and complied with the contribution guidelines of this project.