Skip to content

Commit d7dbdb7

Browse files
committed
fix: correct mergeCSSConfig generic type constraint
修复了 mergeCSSConfig 的泛型约束,使其支持 Options | undefined 类型,而不是只接受 Record<string, any>。 Changes: - 移除 mergeCSSConfig 的泛型约束 `T extends Record<string, any>` - 改为泛型 `T` 以支持任何类型
1 parent 5360a5b commit d7dbdb7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/util/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ export const isClientSide = canUseDom();
158158
/**
159159
* Merge CSS injection configuration with nonce support
160160
*/
161-
export function mergeCSSConfig<T extends Record<string, any>>(
161+
/**
162+
* Merge CSS injection configuration with nonce support
163+
*/
164+
export function mergeCSSConfig<T>(
162165
config: T,
163166
nonce?: string | (() => string),
164167
): T {

0 commit comments

Comments
 (0)