diff --git a/interfaces.d.ts b/interfaces.d.ts index 79fb54cde4..61e0a2d37c 100644 --- a/interfaces.d.ts +++ b/interfaces.d.ts @@ -48,6 +48,47 @@ export type BehaviorInit = Pick< Exclude >; +/** + * The object passed to ".*" wildcard obsevers. A record of a change made to an + * object. + * @template B The object matching the non-wildcard portion of the path. + * @template V Additional types that could be set at the path. + */ +export interface PolymerDeepPropertyChange { + /** Path to the property that changed. */ + path: string; + /** The object matching the non-wildcard portion of the path. */ + base: B; + /** New value of the path that changed. */ + value: B|V; +} + +/** + * A record of changes made to an array. + * @template T The type of the array being observed. + */ +export interface PolymerSplice> { + /** Position where the splice started. */ + index: number; + /** Array of removed items. */ + removed: T; + /** Number of new items inserted at index. */ + addedCount: number; + /** A reference to the array in question. */ + object: T; + /** The string literal 'splice'. */ + type: 'splice'; +} + +/** + * The object passed to ".splices" observers. A set of mutations made to the + * array. + * @template T The type of the array being observed. + */ +export interface PolymerSpliceChange> { + indexSplices: Array>; +} + // Types from "externs/polymer-internal-shared-types.js" export interface StampedTemplate extends DocumentFragment {