You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
446 B
TypeScript
13 lines
446 B
TypeScript
/**
|
|
* Add keys, values of `defaultProps` that does not exist in `props`
|
|
* @param {object} defaultProps
|
|
* @param {object} props
|
|
* @returns {object} resolved props
|
|
*/
|
|
export default function resolveProps<T extends {
|
|
components?: Record<string, unknown>;
|
|
componentsProps?: Record<string, unknown>;
|
|
slots?: Record<string, unknown>;
|
|
slotProps?: Record<string, unknown>;
|
|
} & Record<string, unknown>>(defaultProps: T, props: T): T;
|