Skip to content

fix: enforce type-safe value in setCellStyles#1028

Draft
redfish4ktc wants to merge 1 commit intomainfrom
refactor/improve_signature_types_setCellStyles
Draft

fix: enforce type-safe value in setCellStyles#1028
redfish4ktc wants to merge 1 commit intomainfrom
refactor/improve_signature_types_setCellStyles

Conversation

@redfish4ktc
Copy link

Previously, any value type could be passed for any style key without
compile-time error, allowing bugs like passing a string for a boolean
property. Using a generic constraint ensures the value type matches the
key's declared type in CellStateStyle, catching mismatches at compile
time.

Tasks

  • improve description. Not really a breaking change as wrong values leads to bug

This is a breaking change for any consumer calling setCellStyles with a value that does not match the type of the specified key. These calls were already semantically incorrect — the stricter type now surfaces the error at compile time.

Notes

Covers #840
Should be merged after #1026

Previously, any value type could be passed for any style key without
compile-time error, allowing bugs like passing a string for a boolean
property. Using a generic constraint ensures the value type matches the
key's declared type in CellStateStyle, catching mismatches at compile
time.
@redfish4ktc redfish4ktc added the bug Something isn't working label Mar 24, 2026
@sonarqubecloud
Copy link

@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b7345e44-ecf6-4140-9e16-21bb6ef2f0e7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant