import * as x from '@backit/core/x-value'; export type BackStateMultipleObjectsInput = { update?: T[] | T; delete?: TKey[] | TKey; }; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createBackStateMultipleObjectsXInput< TXKey extends x.TypeInMediumsPartial, TXInput extends x.TypeInMediumsPartial, >(Key: TXKey, Input: TXInput) { return x.object({ update: x.union([x.array(Input), Input]).optional(), delete: x.union([x.array(Key), Key]).optional(), }); }