`Symbol.iterator in FieldTree` is always false
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- angular, typescript
- Domain
- frontend
Research direction
Start in packages/forms/signals/src/field/proxy.ts at the linked proxy handler and inspect how FieldTree responds to property-presence checks versus property access. Verify that the provided TypeScript example recognizes Symbol.iterator and can traverse the FieldTree, while preserving the existing iterator behavior.
Written by the indexing model from the issue text.
Description
Which @angular/* package(s) are the source of the bug?
forms
Is this a regression?
No
Description
I want to traverse a FieldTree<unknown>. A typesafe check for iterability requires checking for presence of Symbol.iterator field:
if (Symbol.iterator in fieldTree && typeof fieldTree[Symbol.iterator] === 'function') {
for (const [k, v] of fieldTree) {
// ...
}
}
However the field proxy doesn't implement has handler, therefore Symbol.iterator is reported as missing, even though it's returned by get handler:
https://github.com/angular/angular/blob/46d2cb7ff049dc4549080f64dceb1541b3a87cee/packages/forms/signals/src/field/proxy.ts#L67
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run ng version)
"@angular/forms": "^22.1.0",
Anything else?
No response
- Dominant language
- TypeScript
- Stars
- 101k
- Forks
- 28.1k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 254
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from angular/angular
-
area: docs
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area: docs gemini-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
area: forms forms: signals
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area: docs area: forms
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area: forms breaking changes forms: validators
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·