import { BreezeEvent } from '../core/event.js'; import type { DataProperty } from '../metadata/entity-metadata.js'; /** The argument to the `arrayChanged` event of a relation, complex or primitive array. */ export interface ArrayChangedArgs { /** The array that changed. */ array: any[]; /** The items added. Undefined when the event reports removals: each change raises its own event, so a `splice` that both removes and adds raises one for the removals, then one for the additions. While a query or import is loading, the changes to an array are collected into a single event that can carry both, as the net change: an item added and removed again during the load is in neither list. */ added?: any[]; /** The items removed. Undefined when the event reports only additions. */ removed?: any[]; } /** * A real array - every Array method is the native one - plus change notification and the links * back to the entity that owns it. Only the five mutators are replaced. * @hidden */ export interface ObservableArray extends Array { arrayChanged: BreezeEvent; parent?: Object; parentProperty?: DataProperty; }