fixes exports to ThemeConfig, CustomThemeConfig in merge.ts
This commit is contained in:
parent
18e49eb99c
commit
b04435ebaa
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import type { Theme, CustomTheme } from '../@types/component';
|
import type { ThemeConfig, CustomThemeConfig } from '../@types/component';
|
||||||
|
|
||||||
function isObject(item: unknown): item is Record<string, unknown> {
|
function isObject(item: unknown): item is Record<string, unknown> {
|
||||||
return item !== null && typeof item === 'object' && !Array.isArray(item);
|
return item !== null && typeof item === 'object' && !Array.isArray(item);
|
||||||
|
|
@ -9,7 +9,7 @@ function isObject(item: unknown): item is Record<string, unknown> {
|
||||||
*/
|
*/
|
||||||
export default function merge<T extends Record<string, unknown>>(
|
export default function merge<T extends Record<string, unknown>>(
|
||||||
target: T,
|
target: T,
|
||||||
...sources: (Theme | CustomTheme)[]
|
...sources: (ThemeConfig | CustomThemeConfig)[]
|
||||||
): T {
|
): T {
|
||||||
if (!sources.length) return target;
|
if (!sources.length) return target;
|
||||||
const source = sources.shift();
|
const source = sources.shift();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue