in index.d.ts ArraySpec has push taking a single array element:
type ArraySpec<T, C extends CustomCommands<object>> =
| { $push: T }
| { $unshift: T }
| { $splice: Array<[number] | [number, number] | [number, number, T]> }
| { [index: string]: Spec<T, C> }; // Note that this does not type check properly if index: number.
but in index.js invariantPushAndUnshift is called:
function invariantPushAndUnshift(value, spec, command) {
invariant(
Array.isArray(value),
'update(): expected target of %s to be an array; got %s.',
command,
value
);
in index.d.ts ArraySpec has push taking a single array element:
but in index.js invariantPushAndUnshift is called: