Skip to content

[type-system] migrate 4 remaining guard-check sites to isAnyArrayTsType#753

Merged
cs01 merged 3 commits intomainfrom
refactor/array-guard-isanyarray
Apr 27, 2026
Merged

[type-system] migrate 4 remaining guard-check sites to isAnyArrayTsType#753
cs01 merged 3 commits intomainfrom
refactor/array-guard-isanyarray

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Apr 27, 2026

Before

4 sites in variable-allocator.ts and type-resolver.ts used raw endsWith("[]") for array type guard checks.

After

All 4 sites use isAnyArrayTsType() from type-system.ts. No behavioral change — both functions return the same boolean result for array types.

No user-facing change. Internal refactor only.

Description

Part of #710 (eliminate raw string array checks). Fifth PR in series. Migrates:

  • variable-allocator.ts:612 — baseType catch-all after specific array checks
  • variable-allocator.ts:750 — strippedType element type dispatch
  • variable-allocator.ts:883 — genericReturn ObjectArray classification
  • type-resolver.ts:739 — valueType array guard

Total guard-check sites migrated: 57 (53 from PRs #711-#712 + 4 from this PR).

@cs01 cs01 merged commit c243315 into main Apr 27, 2026
9 checks passed
@cs01 cs01 deleted the refactor/array-guard-isanyarray branch April 27, 2026 00:55
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