Describe the bug
why passing twMergeConfig to tv function I get this error
Type 'Partial<Config>' is not assignable to type 'Config'.
Types of property 'cacheSize' are incompatible.
Type 'number | undefined' is not assignable to type 'number'.
Type 'undefined' is not assignable to type 'number'.
the Problem is in tv typing where twMergeConfig is type of TwMergeConfig
import type {Config as TwMergeConfig} from "tailwind-merge";
export type TWMConfig = {
twMergeConfig?: TwMergeConfig;
};
however, inside tailwind-merge the config type is
import { Config } from './types';
type CreateConfigSubsequent = (config: Config) => Config;
export declare function extendTailwindMerge(configExtension: Partial<Config> | CreateConfigSubsequent, ...createConfig: CreateConfigSubsequent[]): (...classLists: import("./tw-join").ClassNameValue[]) => string;
To Reproduce
check vscode
Expected behaviortwMergeConfig has to correct typing
Describe the bug why passing
twMergeConfig
to tv function I get this errorthe Problem is in tv typing where
twMergeConfig
is type ofTwMergeConfig
however, inside
tailwind-merge
the config type isTo Reproduce check vscode
Expected behavior
twMergeConfig
has to correct typing