import { isEmptyObject } from '../../helpers/is-empty-object' ; import { WriteBatchCreate , WriteBatchDelete } from './write-batch' ; export function isBatchAddCreateItem < Entity > ( item ) { return ! isEmptyObject ( item ) && ! ! ( item as WriteBatchCreate < Entity > ) . create ; } export function isBatchAddDeleteItem < Entity , PrimaryKey > ( item ) { return ( ! isEmptyObject ( item ) && ! ! ( item as WriteBatchDelete < Entity , PrimaryKey > ) . delete ) ; }