toss / es-toolkit

A modern JavaScript utility library that's 2-3 times faster and up to 97% smaller—a major upgrade to lodash.
https://es-toolkit.slash.page
Other
6.25k stars 263 forks source link

chore: remove types of jsdoc #470

Closed dayongkr closed 1 week ago

dayongkr commented 1 week ago

Description

We define types using TypeScript, so it doesn't seem necessary to specify types with JSDoc as well. Specifying both can lead to mistakes where different types are inadvertently documented, and it's quite cumbersome to update the JSDoc every time the TypeScript types are changed.

Moreover, even if we extract JSDoc to automate documentation, it’s pointless because JSDoc doesn’t fully support all of TypeScript’s types.

It seems more accurate to use a TypeScript parser to extract types instead.

Screenshot 2024-09-02 at 11 15 28 AM

Additionally, even if we specify types in JSDoc, tools like VS Code only display type information based on TypeScript, just as described above.

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
es-toolkit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 2, 2024 2:31am
codecov-commenter commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.70%. Comparing base (3a6cb36) to head (01b7a85).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/toss/es-toolkit/pull/470/graphs/tree.svg?width=650&height=150&src=pr&token=8N5S3AR3C7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss)](https://app.codecov.io/gh/toss/es-toolkit/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) ```diff @@ Coverage Diff @@ ## main #470 +/- ## ========================================== - Coverage 99.78% 99.70% -0.08% ========================================== Files 171 171 Lines 1366 1365 -1 Branches 364 364 ========================================== - Hits 1363 1361 -2 - Misses 2 3 +1 Partials 1 1 ```