docs: add asm type annotation - #13905
Merged
Merged
Conversation
…its` Adds the `// asm type annotation` trailing comment on the `|0` coercion in `lib/index.js`, matching the convention used by 90% (18/20) of the `|0`-idiom packages in `constants/float32`. `num-significand-bits` was the sole package applying the `|0` asm.js coercion without the annotation comment. The change is comment-only and does not affect the exported value, observable behavior, or test expectations. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4c2XThBy9A3uLkcBot3yp
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
Aug 4, 2026
constants/float32/num-significand-bits
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds the
// asm type annotationtrailing comment to the|0coercion inconstants/float32/num-significand-bits. It was the sole package in the namespace applying the asm.js|0idiom without the annotation carried by 90% (18/20) of its|0-idiom siblings.constants/float32/num-significand-bitsThe
|0coercion on the exportedinteger32constant lacked the// asm type annotationcomment used across the namespace's integer constants. This aligns the single outlier with the established convention. The change is comment-only; the exported value (23), theinteger32type, and the tests are unchanged.Related Issues
No.
Questions
No.
Other
The correction was surfaced by structural and semantic feature extraction across the 68-member
constants/float32namespace, then cross-referenced against the parallelconstants/float64namespace to separate intentional per-constant curation (e.g.@seeand keyword differences, which mirror float64) from genuine drift. The missing annotation was the only high-signal, mechanical, non-behavioral correction to survive filtering, and it is not mirrored in float64 (which has nonum-significand-bitspackage).Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code running an automated cross-package drift-detection routine. The routine extracted structural and semantic features across the namespace, computed the majority convention per feature, cross-referenced the
constants/float64sibling namespace to reject intentional deviations, and applied the single surviving one-line comment correction. The change was reviewed against sibling-package conventions before submission.@stdlib-js/reviewers
Generated by Claude Code