Patch Changes
- c65d2a7: fix(DSTSUP-253): make
cvaresults assignable toComponentStyleFunctionunder default strict TypeScript.@marigold/system@17.5.0shippedcva@1.0.0-beta.4, whose narrowed return type stopped satisfyingComponentStyleFunction<Variants, Sizes>once consumers enabledstrictFunctionTypes(implied bystrict: true). Function-parameter contravariance rejected both the deadvariant?: Variants | nullslot and thestringvs literal-union variant mismatch, breaking every consumer theme that followed the documentedcva(...) as ThemeComponent<'Foo'>pattern.ComponentStyleFunctionnow typesvariant/sizeasany— honestly reflecting the runtime contract (useClassNamespassesstring | undefined,cvafalls back to base styles for unknown values) and letting narrowercvareturns satisfy the wider theme contract.Variants/Sizes/Additionalgenerics stay for backward source-compatibility. A dedicated type-level regression test (packages/system/src/types/theme.test-d.ts) uses aStrictlyAssignable<Source, Target>conditional-type helper to verify the contract under TypeScript's structural function checking, so this class of bug is caught by the regularpnpm typecheckeven though the monorepo's base config keepsstrictFunctionTypes: false.