Skip to content

Commit 66b8a1e

Browse files
committed
fix: improved types
1 parent 279f1d2 commit 66b8a1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/jacaranda/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export function defineTokens<T extends TokenConfig>(tokenConfig: T): CreateToken
219219
}, {} as TokenConfig);
220220

221221
// Create a wrapped styles function that resolves token references
222-
const sva: typeof styles = (config: any) => {
222+
const sva: typeof styles = <V extends VariantOptions<V>>(config: VariantStyleConfig<V>) => {
223223
// Resolve tokens in base styles
224224
const resolvedBase = config.base ? resolveTokens(config.base, tokens) : config.base;
225225

@@ -236,8 +236,8 @@ export function defineTokens<T extends TokenConfig>(tokenConfig: T): CreateToken
236236
{},
237237
);
238238
return { ...acc, [key]: resolvedGroup };
239-
}, {})
240-
: {};
239+
}, {}) as V
240+
: {} as V;
241241

242242
// Resolve tokens in compound variants
243243
const resolvedCompoundVariants = config.compoundVariants?.map((compound: any) => ({

0 commit comments

Comments
 (0)