Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObservableArray<T>

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

Properties

Private _isViewBase

_isViewBase: boolean

length

length: number

Static changeEvent

changeEvent: string

Static propertyChangeEvent

propertyChangeEvent: string

Methods

Private _createPropertyChangeData

Private _emit

  • _emit(eventNames: string): any

addEventListener

  • addEventListener(eventNames: string, callback: function, thisArg?: any): any

concat

  • concat<U>(...items: U[]): T[]
  • concat(...items: T[]): T[]

every

  • every(callbackfn: function, thisArg?: any): boolean
  • Parameters

    • callbackfn: function
        • (value: T, index: number, array: T[]): boolean
        • Parameters

          • value: T
          • index: number
          • array: T[]

          Returns boolean

    • Optional thisArg: any

    Returns boolean

filter

  • filter(callbackfn: function, thisArg?: any): T[]

forEach

  • forEach(callbackfn: function, thisArg?: any): void

get

  • get(name: string): any

getItem

  • getItem(index: number): T

hasListeners

  • hasListeners(eventName: string): boolean

indexOf

  • indexOf(searchElement: T, fromIndex?: number): number

join

  • join(separator?: string): string

lastIndexOf

  • lastIndexOf(searchElement: T, fromIndex?: number): number

map

  • map<U>(callbackfn: function, thisArg?: any): U[]
  • Type parameters

    • U

    Parameters

    • callbackfn: function
        • (value: T, index: number, array: T[]): U
        • Parameters

          • value: T
          • index: number
          • array: T[]

          Returns U

    • Optional thisArg: any

    Returns U[]

notify

  • notify<T>(data: T): void

notifyPropertyChange

  • notifyPropertyChange(propertyName: string, value: any, oldValue?: any): void

off

  • off(eventNames: string, callback?: any, thisArg?: any): any

on

  • on(eventNames: string, callback: function, thisArg?: any): any
  • on(event: "change", callback: function, thisArg?: any): any

once

  • once(event: string, callback: function, thisArg?: any): any

pop

  • pop(): T

push

  • push(items: T[]): number
  • push(...items: T[]): number

reduce

  • reduce(callbackfn: function, initialValue?: T): T
  • reduce<U>(callbackfn: function, initialValue: U): U
  • Parameters

    • callbackfn: function
        • (previousValue: T, currentValue: T, currentIndex: number, array: T[]): T
        • Parameters

          • previousValue: T
          • currentValue: T
          • currentIndex: number
          • array: T[]

          Returns T

    • Optional initialValue: T

    Returns T

  • Type parameters

    • U

    Parameters

    • callbackfn: function
        • (previousValue: U, currentValue: T, currentIndex: number, array: T[]): U
        • Parameters

          • previousValue: U
          • currentValue: T
          • currentIndex: number
          • array: T[]

          Returns U

    • initialValue: U

    Returns U

reduceRight

  • reduceRight(callbackfn: function, initialValue?: T): T
  • reduceRight<U>(callbackfn: function, initialValue: U): U
  • Parameters

    • callbackfn: function
        • (previousValue: T, currentValue: T, currentIndex: number, array: T[]): T
        • Parameters

          • previousValue: T
          • currentValue: T
          • currentIndex: number
          • array: T[]

          Returns T

    • Optional initialValue: T

    Returns T

  • Type parameters

    • U

    Parameters

    • callbackfn: function
        • (previousValue: U, currentValue: T, currentIndex: number, array: T[]): U
        • Parameters

          • previousValue: U
          • currentValue: T
          • currentIndex: number
          • array: T[]

          Returns U

    • initialValue: U

    Returns U

removeEventListener

  • removeEventListener(eventNames: string, callback?: any, thisArg?: any): any

reverse

  • reverse(): T[]

set

  • set(name: string, value: any): void

setItem

  • setItem(index: number, value: T): void

shift

  • shift(): T

slice

  • slice(start?: number, end?: number): T[]

some

  • some(callbackfn: function, thisArg?: any): boolean
  • Parameters

    • callbackfn: function
        • (value: T, index: number, array: T[]): boolean
        • Parameters

          • value: T
          • index: number
          • array: T[]

          Returns boolean

    • Optional thisArg: any

    Returns boolean

sort

  • sort(compareFn?: function): T[]

splice

  • splice(start: number): T[]
  • splice(start: number, deleteCount: number, ...items: T[]): T[]

toLocaleString

  • toLocaleString(): string

toString

  • toString(): string

unshift

  • unshift(...items: T[]): number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method