Skip to content

feat(customizer): improve condition tree leaf typing#1509

Open
DayTF wants to merge 1 commit intomainfrom
feat/improve-condition-tree-leaf-typing
Open

feat(customizer): improve condition tree leaf typing#1509
DayTF wants to merge 1 commit intomainfrom
feat/improve-condition-tree-leaf-typing

Conversation

@DayTF
Copy link
Copy Markdown
Contributor

@DayTF DayTF commented Mar 25, 2026

Definition of Done

General

  • Write an explicit title for the Pull Request, following Conventional Commits specification
  • Test manually the implemented changes
  • Validate the code quality (indentation, syntax, style, simplicity, readability)

Security

  • Consider the security impact of the changes made

Note

Refine TConditionTreeLeaf typing to enforce operator-specific value constraints

  • Introduces a discriminated union for TConditionTreeLeaf in templates.ts, splitting operators into NoValueOperator, ArrayValueOperator, NumberValueOperator, and SingleValueOperator categories so the value type is statically enforced per operator.
  • Updates CollectionCustomizer and DataSourceCustomizer methods to cast generic typed definitions through unknown before passing to internal decorators, resolving type mismatches introduced by the stricter leaf typing.
  • Replaces ConditionTreeLeaf constructor usage in tests with plain object literals that satisfy the new discriminated union shape.

Macroscope summarized 16c414f.

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