Skip to content

Comments

Refactor type resolution logic in WriteColumnAttribute and update array mapping in TypescriptMappings#105

Merged
tcampbPPU merged 3 commits intomasterfrom
fix-attributes-getting-improperly-mapped
Oct 21, 2025
Merged

Refactor type resolution logic in WriteColumnAttribute and update array mapping in TypescriptMappings#105
tcampbPPU merged 3 commits intomasterfrom
fix-attributes-getting-improperly-mapped

Conversation

@tcampbPPU
Copy link
Member

@tcampbPPU tcampbPPU commented Sep 22, 2025

resolves #103

@tcampbPPU tcampbPPU requested a review from Copilot September 22, 2025 14:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors type resolution logic to improve how TypeScript types are mapped and resolved, particularly for array types and fallback type handling.

  • Updates the array type mapping from string[] to Array<unknown> for better type safety
  • Adds fallback logic in WriteColumnAttribute to prioritize mapped types over class names when available

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/Constants/TypescriptMappings.php Changes array type mapping to use generic Array<unknown> syntax
src/Actions/WriteColumnAttribute.php Adds conditional logic to prefer mapped types over class names when resolving types

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tcampbPPU tcampbPPU merged commit 8a12391 into master Oct 21, 2025
32 checks passed
@tcampbPPU tcampbPPU deleted the fix-attributes-getting-improperly-mapped branch January 6, 2026 20:23
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.

[BUG] Attributes return incorrect types bool and array

1 participant