SplitProps
The type of splitProps(props, ...keyLists): one object per key list, picking those keys, then the rest without any listed key.
The type of splitProps(props, ...keyLists): one object per key list, picking those keys, then
the rest without any listed key.
Import#
ts
import type { SplitProps } from "@shadow-js/core";
Signature#
ts
type SplitProps<T extends object, K extends readonly (readonly (keyof T)[])[]> = [
...{ [I in keyof K]: Pick<T, Extract<K[I][number], keyof T>> },
Omit<T, K[number][number]>,
]