You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhancing Type Safety in useStyles, useStylesV2, and mergeObjects Functions
This commit improves type safety in the useStyles, useStylesV2, and mergeObjects functions, along with their associated tests. The types of customTokens and the objects being merged are now more strictly defined.
Changes include:
useStyles and useStylesV2 functions now require T to extend object, and customTokens is now of type Partial<T>. This ensures that customTokens is a subset of T.
mergeObjects function now requires its target and sources parameters to extend object. The return type is now Partial<T & S>, indicating that the result is a subset of the union of T and S.
Tests for mergeObjects have been updated to reflect the new types. The objects being merged are now explicitly typed.
0 commit comments