Closed dayongkr closed 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 4, 2024 1:51am |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.71%. Comparing base (
3a6cb36
) to head (229181a
). Report is 12 commits behind head on main.
This is really impressive—thank you so much! I have a few thoughts:
readonly
from our type generation?
zip
, but I guess the current implementation is not supporting it quite properly...First of all, thank you for your feedback. Here are my thoughts in response:
I briefly looked into @deno/doc
, and it seems quite powerful. However, it doesn’t provide support for the range value, meaning that I would need to generate the types manually through AST. This adds a lot of branching and code, which raises concerns regarding maintainability and stability. But it still looks great!
By the way, the development process itself was fun. So, I'm totally fine with closing this PR, merging this codes into the main branch, and then finding areas for improvement later on!
Thanks!
This issue is resolved by a9e7edde14e6f2b5a1e61262344de366879a9aee.
So I close this PR!
Description
I’ve implemented an automation feature using VitePress’s
dynamic routes
andcomment-parser
with@typescript-eslint/parser
to generate documentation(onlyreference/array
).The approach is as follows:
fs
module are used to generate paths for each function (reference/array/[function].md
,reference/array/[function].paths.mts
are for Dynamic routes).comment-parser
to extract JSDoc comments (e.g., function descriptions, parameter details) and with@typescript-eslint/parser
to retrieve Function signatures and types.This setup allows for the English documentation to be created by simply adding a folder and two files for
Dynamic routes
per function category.Before proceeding further, I’ve opened a PR to get feedback on the current implementation way. I would appreciate your feedback.
Rough flow chart