Skip to content

docs(uuid): fix stale v1 JSDoc and remove unnecessary casts from examples - #7285

Open
tomas-zijdemans wants to merge 1 commit into
denoland:mainfrom
tomas-zijdemans:docs-uuid-stale-jsdoc
Open

docs(uuid): fix stale v1 JSDoc and remove unnecessary casts from examples#7285
tomas-zijdemans wants to merge 1 commit into
denoland:mainfrom
tomas-zijdemans:docs-uuid-stale-jsdoc

Conversation

@tomas-zijdemans

Copy link
Copy Markdown
Contributor

Fixes doc rot in @std/uuid left behind by an old API change. No code changes.

v1.generate() used to return string | number[]. The union is long gone, but three traces of it survived:

  • Two {@linkcode V1Options.*} references in v1.ts point at an interface that was renamed to GenerateOptions, so the links render dead on JSR.
  • The @returns doc still says "a UUIDv1 string or an array of 16 bytes". It returns a string.
  • Four examples (v1, v6, and two in mod.ts) cast validate(uuid as string). The casts are no-ops now, and they teach readers to distrust a return type that is plain string.

All doc examples still compile and pass: deno test --doc uuid/ is green, 66 tests.

I used Claude Code to help investigate and write this change.

@github-actions github-actions Bot added the uuid label Aug 6, 2026
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.03%. Comparing base (ca58f94) to head (78c0195).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7285      +/-   ##
==========================================
- Coverage   95.03%   95.03%   -0.01%     
==========================================
  Files         617      618       +1     
  Lines       51637    51892     +255     
  Branches     9359     9408      +49     
==========================================
+ Hits        49075    49316     +241     
- Misses       2021     2030       +9     
- Partials      541      546       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant