docs(core): align I18nCreateOpCode pseudocode comment with implementation#69826
Open
CYANO-01 wants to merge 2 commits into
Open
docs(core): align I18nCreateOpCode pseudocode comment with implementation#69826CYANO-01 wants to merge 2 commits into
CYANO-01 wants to merge 2 commits into
Conversation
…tion The pseudocode example in the `I18nCreateOpCodes` interface JSDoc used `>>` (signed right shift) to extract the node index from an opcode, but the actual runtime implementation in `i18n_apply.ts` and `i18n_debug.ts` consistently uses `>>>` (unsigned right shift). Aligning the comment with the implementation prevents readers from inadvertently introducing a signed-shift bug when transcribing the example.
JeanMeche
approved these changes
Jul 17, 2026
Member
|
caretaker note: This is a doc only change, no need to presubmit. |
Member
|
There are filing checks on this PR: https://github.com/angular/angular/actions/runs/29545758563/job/88315088607?pr=69826 |
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.
Problem
The JSDoc pseudocode example in the
I18nCreateOpCodesinterface documentation uses>>(signed right shift) to extract the node index from an opcode:However, the actual runtime implementation in
i18n_apply.tsandi18n_debug.tsconsistently uses>>>(unsigned right shift) for this exact operation:A reader consulting the comment pseudocode when implementing a similar decode loop could introduce a subtle signed-shift bug.
Fix
Align the comment pseudocode with the implementation: change
>>to>>>.This is a docs-only change; no runtime behaviour is affected.