Function watchArrayField

  • Similar to watchField, but for array fields, like tuples. Getting the property returns a shallow copy of the tuple, setting the value uses a shallow copy of the input value if the current value is not an array. If both the new value and the current value are arrays, then the current value's members are updated; no shallow copy is created.

    Parameters

    • callback: (() => void)

      The callback to call if the value changes. this is bound.

        • (): void
        • Returns void

    • allowNonArrays: boolean = false

      Allow values which are not arrays to be used?

    Returns PropertyDecorator