Skip to content

format: migrate type guards from instanceof Array to Array.isArray#231

Merged
gnidan merged 1 commit into
mainfrom
debugger-array-isarray
Jul 3, 2026
Merged

format: migrate type guards from instanceof Array to Array.isArray#231
gnidan merged 1 commit into
mainfrom
debugger-array-isarray

Conversation

@gnidan

@gnidan gnidan commented Jul 2, 2026

Copy link
Copy Markdown
Member

Consistency follow-up (task #8), surfaced by the #212 review.

Array.isArray is the cross-realm-safe form and was already used by the
newer context guards (isPick, isGather) and isTransform on the
transform-context branch. This migrates the remaining 12 x instanceof Array sites across the packages/format type guards
(type/pointer/materials/program/context) up to match, rather than
leaving inconsistent siblings behind.

Scope note: the task originally named just isVariables/isPick, but on
main isPick/isGather were already migrated — only isVariables
lagged. Since the rationale (cross-realm safety) applies uniformly and
the edit is identical, I swept all 12 sites in one pass.

Behavior-preserving; no test changes needed. Full suite green (983
passed), build/lint/format all clean.

Array.isArray is the cross-realm-safe form and was already used by the
newer context guards (isPick, isGather) and isTransform. Migrate the
remaining 12 sites across the type/pointer/materials/program/context
guards up to match, rather than leaving inconsistent siblings.

Behavior-preserving cleanup; no test changes needed.
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-03 00:08 UTC

@gnidan gnidan merged commit d6699f5 into main Jul 3, 2026
5 checks passed
@gnidan gnidan deleted the debugger-array-isarray branch July 3, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant