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
  • Parameters

    • eventNames: string

    Returns any

addEventListener

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

    • eventNames: string
    • callback: function
    • Optional thisArg: any

    Returns any

concat

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

    • U: T[]

    Parameters

    • Rest ...items: U[]

    Returns T[]

  • Parameters

    • Rest ...items: T[]

    Returns 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[]
  • Parameters

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

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

          Returns boolean

    • Optional thisArg: any

    Returns T[]

forEach

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

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

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

          Returns void

    • Optional thisArg: any

    Returns void

get

  • get(name: string): any
  • Parameters

    • name: string

    Returns any

getItem

  • getItem(index: number): T
  • Parameters

    • index: number

    Returns T

hasListeners

  • hasListeners(eventName: string): boolean
  • Parameters

    • eventName: string

    Returns boolean

indexOf

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

    • searchElement: T
    • Optional fromIndex: number

    Returns number

join

  • join(separator?: string): string
  • Parameters

    • Optional separator: string

    Returns string

lastIndexOf

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

    • searchElement: T
    • Optional fromIndex: number

    Returns 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
  • Type parameters

    Parameters

    • data: T

    Returns void

notifyPropertyChange

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

    • propertyName: string
    • value: any
    • Optional oldValue: any

    Returns void

off

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

    • eventNames: string
    • Optional callback: any
    • Optional thisArg: any

    Returns any

on

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

    • eventNames: string
    • callback: function
    • Optional thisArg: any

    Returns any

  • Parameters

    • event: "change"
    • callback: function
    • Optional thisArg: any

    Returns any

once

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

    • event: string
    • callback: function
    • Optional thisArg: any

    Returns any

pop

  • pop(): T
  • Returns T

push

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

    • items: T[]

    Returns number

  • Parameters

    • Rest ...items: T[]

    Returns 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
  • Parameters

    • eventNames: string
    • Optional callback: any
    • Optional thisArg: any

    Returns any

reverse

  • reverse(): T[]
  • Returns T[]

set

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

    • name: string
    • value: any

    Returns void

setItem

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

    • index: number
    • value: T

    Returns void

setProperty

  • setProperty(name: string, value: any): void
  • Parameters

    • name: string
    • value: any

    Returns void

shift

  • shift(): T
  • Returns T

slice

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

    • Optional start: number
    • Optional end: number

    Returns 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[]
  • Parameters

    • Optional compareFn: function
        • (a: T, b: T): number
        • Parameters

          • a: T
          • b: T

          Returns number

    Returns T[]

splice

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

    • start: number

    Returns T[]

  • Parameters

    • start: number
    • deleteCount: number
    • Rest ...items: T[]

    Returns T[]

toLocaleString

  • toLocaleString(): string
  • Returns string

toString

  • toString(): string
  • Returns string

unshift

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

    • Rest ...items: T[]

    Returns 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