NativeScript Docs
Core Modules
NativeScript Angular
NativeScript UI
Article title
view on GitHub
Search
Preparing search index...
The search index is not available
NativeScript
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
"data/observable-array"
ObservableArray
Class ObservableArray<T>
Globals
"data/observable-
array"
Change
Type
Observable
Array
constructor
_is
View
Base
length
change
Event
property
Change
Event
_create
Property
Change
Data
_emit
add
Event
Listener
concat
every
filter
for
Each
get
get
Item
has
Listeners
index
Of
join
last
Index
Of
map
notify
notify
Property
Change
off
on
once
pop
push
reduce
reduce
Right
remove
Event
Listener
reverse
set
set
Item
set
Property
shift
slice
some
sort
splice
to
Locale
String
to
String
unshift
Changed
Data
Type parameters
T
Hierarchy
Observable
Index
Constructors
constructor
Properties
_is
View
Base
length
change
Event
property
Change
Event
Methods
_create
Property
Change
Data
_emit
add
Event
Listener
concat
every
filter
for
Each
get
get
Item
has
Listeners
index
Of
join
last
Index
Of
map
notify
notify
Property
Change
off
on
once
pop
push
reduce
reduce
Right
remove
Event
Listener
reverse
set
set
Item
set
Property
shift
slice
some
sort
splice
to
Locale
String
to
String
unshift
Constructors
constructor
new
Observable
Array
(
arrayLength
?:
number
)
:
ObservableArray
new
Observable
Array
(
items
:
T[]
)
:
ObservableArray
new
Observable
Array
(
...
items
:
T[]
)
:
ObservableArray
Parameters
Optional
arrayLength:
number
Returns
ObservableArray
Parameters
items:
T[]
Returns
ObservableArray
Parameters
Rest
...
items:
T[]
Returns
ObservableArray
Properties
Private
_is
View
Base
_is
View
Base
:
boolean
length
length
:
number
Static
change
Event
change
Event
:
string
Static
property
Change
Event
property
Change
Event
:
string
Methods
Private
_create
Property
Change
Data
_create
Property
Change
Data
(
name
:
string
, value
:
any
, oldValue
?:
any
)
:
PropertyChangeData
Parameters
name:
string
value:
any
Optional
oldValue:
any
Returns
PropertyChangeData
Private
_emit
_emit
(
eventNames
:
string
)
:
any
Parameters
eventNames:
string
Returns
any
add
Event
Listener
add
Event
Listener
(
eventNames
:
string
, callback
:
function
, thisArg
?:
any
)
:
any
Parameters
eventNames:
string
callback:
function
(
data
:
EventData
)
:
void
Parameters
data:
EventData
Returns
void
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[]
for
Each
for
Each
(
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
get
Item
get
Item
(
index
:
number
)
:
T
Parameters
index:
number
Returns
T
has
Listeners
has
Listeners
(
eventName
:
string
)
:
boolean
Parameters
eventName:
string
Returns
boolean
index
Of
index
Of
(
searchElement
:
T
, fromIndex
?:
number
)
:
number
Parameters
searchElement:
T
Optional
fromIndex:
number
Returns
number
join
join
(
separator
?:
string
)
:
string
Parameters
Optional
separator:
string
Returns
string
last
Index
Of
last
Index
Of
(
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
T
:
EventData
Parameters
data:
T
Returns
void
notify
Property
Change
notify
Property
Change
(
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
(
data
:
EventData
)
:
void
Parameters
data:
EventData
Returns
void
Optional
thisArg:
any
Returns
any
Parameters
event:
"change"
callback:
function
(
args
:
ChangedData
<
T
>
)
:
void
Parameters
args:
ChangedData
<
T
>
Returns
void
Optional
thisArg:
any
Returns
any
once
once
(
event
:
string
, callback
:
function
, thisArg
?:
any
)
:
any
Parameters
event:
string
callback:
function
(
data
:
EventData
)
:
void
Parameters
data:
EventData
Returns
void
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
reduce
Right
reduce
Right
(
callbackfn
:
function
, initialValue
?:
T
)
:
T
reduce
Right<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
remove
Event
Listener
remove
Event
Listener
(
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
set
Item
set
Item
(
index
:
number
, value
:
T
)
:
void
Parameters
index:
number
value:
T
Returns
void
set
Property
set
Property
(
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[]
to
Locale
String
to
Locale
String
(
)
:
string
Returns
string
to
String
to
String
(
)
:
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