@microsoft/fast-element > Splice

Splice class

A splice map is a representation of how a previous array of items was transformed into a new array of items. Conceptually it is a list of tuples of

(index, removed, addedCount)

which are kept in ascending index order of. The tuple represents that at the |index|, |removed| sequence of items were removed, and counting forward from |index|, |addedCount| items were added.

Signature:

export declare class Splice 

Constructors

Constructor

Modifiers

Description

(constructor)(index, removed, addedCount)

Creates a splice.

Properties

Property

Modifiers

Type

Description

addedCount

number

index

number

removed

any[]

reset?

boolean

(Optional) Indicates that this splice represents a complete array reset.

Methods

Method

Modifiers

Description

adjustTo(array)

Adjusts the splice index based on the provided array.