import { UpdateManyToManyAssociationsOptions, UpdateOneToManyAssociationsOptions } from '../interfaces'; import { AuthenticatedUser } from '../interfaces/authenticated-user.interface'; import { CreatedByEntity } from '../models/created-by.entity'; import { JoinTableEntity } from '../models/join-table.entity'; import { AttributesOf } from './attributes-of.type'; export type UpdateAssociationFillFunction< T extends JoinTableEntity | CreatedByEntity, AuthenticatedUserType extends AuthenticatedUser = AuthenticatedUser, NewChildrenType = any > = ( newChild: NewChildrenType, index: number, existingRecord: T, updateOptions: | UpdateManyToManyAssociationsOptions | UpdateOneToManyAssociationsOptions ) => AttributesOf | Promise>;