LocationsResponse interface

Extends

Array<Location>

Properties

Array
length

Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.

Methods

at(number)

Takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.

concat(ConcatArray<Location>[])

Combines two or more arrays.

concat(T | ConcatArray<T>[])

Combines two or more arrays.

copyWithin(number, number, undefined | number)

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

entries()

Returns an iterable of key, value pairs for every entry in the array

every((value: Location, index: number, array: Location[]) => unknown, any)

Determines whether all the members of an array satisfy the specified test.

fill(Location, undefined | number, undefined | number)

Returns the this object after filling the section identified by start and end with value

filter((value: Location, index: number, array: Location[]) => unknown, any)

Returns the elements of an array that meet the condition specified in a callback function.

filter<S>((value: Location, index: number, array: Location[]) => boolean, any)

Returns the elements of an array that meet the condition specified in a callback function.

find((value: Location, index: number, obj: Location[]) => unknown, any)
find<S>((this: void, value: Location, index: number, obj: Location[]) => boolean, any)

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

findIndex((value: Location, index: number, obj: Location[]) => unknown, any)

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

flat<U>(undefined | number)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth. If no depth is provided, flat method defaults to the depth of 1.

flat<U>(U[], 0)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

flat<U>(U[][], undefined | 1)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

flat<U>(U[][][], 2)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

flat<U>(U[][][][], 3)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

flat<U>(U[][][][][], 4)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

flat<U>(U[][][][][][], 5)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

flat<U>(U[][][][][][][], 6)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

flat<U>(U[][][][][][][][], 7)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

flatMap<U>((this: This, value: Location, index: number, array: Location[]) => U | ReadonlyArray<U>, This)

Calls a defined callback function on each element of an array. Then, flattens the result into a new array. This is identical to a map followed by flat with depth 1.

forEach((value: Location, index: number, array: Location[]) => void, any)

Performs the specified action for each element in an array.

includes(Location, undefined | number)

Determines whether an array includes a certain element, returning true or false as appropriate.

indexOf(Location, undefined | number)

Returns the index of the first occurrence of a value in an array.

join(undefined | string)

Adds all the elements of an array separated by the specified separator string.

keys()

Returns an iterable of keys in the array

lastIndexOf(Location, undefined | number)

Returns the index of the last occurrence of a specified value in an array.

map<U>((value: Location, index: number, array: Location[]) => U, any)

Calls a defined callback function on each element of an array, and returns an array that contains the results.

pop()

Removes the last element from an array and returns it.

push(Location[])

Appends new elements to an array, and returns the new length of the array.

reduce((previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location)

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

reduce((previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location, Location)
reduce<U>((previousValue: U, currentValue: Location, currentIndex: number, array: Location[]) => U, U)

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

reduceRight((previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location)

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

reduceRight((previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location, Location)
reduceRight<U>((previousValue: U, currentValue: Location, currentIndex: number, array: Location[]) => U, U)

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

reverse()

Reverses the elements in an Array.

shift()

Removes the first element from an array and returns it.

slice(undefined | number, undefined | number)

Returns a section of an array.

some((value: Location, index: number, array: Location[]) => unknown, any)

Determines whether the specified callback function returns true for any element of an array.

sort(undefined | (a: Location, b: Location) => number)

Sorts an array.

splice(number, number, Location[])

Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

splice(number, undefined | number)

Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

toLocaleString()

Returns a string representation of an array. The elements are converted to string using their toLocalString methods.

toString()

Returns a string representation of an array.

unshift(Location[])

Inserts new elements at the start of an array.

values()

Returns an iterable of values in the array

Property Details

Array

Array: ArrayConstructor

Property Value

ArrayConstructor

length

Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.

length: number

Property Value

number

Method Details

at(number)

Takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.

function at(index: number)

Parameters

index

number

Returns

Location | undefined

concat(ConcatArray<Location>[])

Combines two or more arrays.

function concat(items: ConcatArray<Location>[])

Parameters

items

ConcatArray<Location>[]

Additional items to add to the end of array1.

Returns

concat(T | ConcatArray<T>[])

Combines two or more arrays.

function concat(items: T | ConcatArray<T>[])

Parameters

items

T | ConcatArray<T>[]

Additional items to add to the end of array1.

Returns

copyWithin(number, number, undefined | number)

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

function copyWithin(target: number, start: number, end?: undefined | number)

Parameters

target

number

If target is negative, it is treated as length+target where length is the length of the array.

start

number

If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.

end

undefined | number

If not specified, length of the this object is used as its default value.

Returns

this

entries()

Returns an iterable of key, value pairs for every entry in the array

function entries()

Returns

IterableIterator<Object>

every((value: Location, index: number, array: Location[]) => unknown, any)

Determines whether all the members of an array satisfy the specified test.

function every(callbackfn: (value: Location, index: number, array: Location[]) => unknown, thisArg?: any)

Parameters

callbackfn

(value: Location, index: number, array: Location[]) => unknown

A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.

thisArg

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns

boolean

fill(Location, undefined | number, undefined | number)

Returns the this object after filling the section identified by start and end with value

function fill(value: Location, start?: undefined | number, end?: undefined | number)

Parameters

value
Location

value to fill array section with

start

undefined | number

index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.

end

undefined | number

index to stop filling the array at. If end is negative, it is treated as length+end.

Returns

this

filter((value: Location, index: number, array: Location[]) => unknown, any)

Returns the elements of an array that meet the condition specified in a callback function.

function filter(callbackfn: (value: Location, index: number, array: Location[]) => unknown, thisArg?: any)

Parameters

callbackfn

(value: Location, index: number, array: Location[]) => unknown

A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.

thisArg

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns

filter<S>((value: Location, index: number, array: Location[]) => boolean, any)

Returns the elements of an array that meet the condition specified in a callback function.

function filter<S>(callbackfn: (value: Location, index: number, array: Location[]) => boolean, thisArg?: any)

Parameters

callbackfn

(value: Location, index: number, array: Location[]) => boolean

A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.

thisArg

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns

S[]

find((value: Location, index: number, obj: Location[]) => unknown, any)

function find(predicate: (value: Location, index: number, obj: Location[]) => unknown, thisArg?: any)

Parameters

predicate

(value: Location, index: number, obj: Location[]) => unknown

thisArg

any

Returns

Location | undefined

find<S>((this: void, value: Location, index: number, obj: Location[]) => boolean, any)

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

function find<S>(predicate: (this: void, value: Location, index: number, obj: Location[]) => boolean, thisArg?: any)

Parameters

predicate

(this: void, value: Location, index: number, obj: Location[]) => boolean

find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.

thisArg

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

Returns

S | undefined

findIndex((value: Location, index: number, obj: Location[]) => unknown, any)

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

function findIndex(predicate: (value: Location, index: number, obj: Location[]) => unknown, thisArg?: any)

Parameters

predicate

(value: Location, index: number, obj: Location[]) => unknown

find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.

thisArg

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

Returns

number

flat<U>(undefined | number)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth. If no depth is provided, flat method defaults to the depth of 1.

function flat<U>(depth?: undefined | number)

Parameters

depth

undefined | number

The maximum recursion depth

Returns

any[]

flat<U>(U[], 0)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

function flat<U>(this: U[], depth: 0)

Parameters

this

U[]

depth

0

The maximum recursion depth

Returns

U[]

flat<U>(U[][], undefined | 1)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

function flat<U>(this: U[][], depth?: undefined | 1)

Parameters

this

U[][]

depth

undefined | 1

The maximum recursion depth

Returns

U[]

flat<U>(U[][][], 2)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

function flat<U>(this: U[][][], depth: 2)

Parameters

this

U[][][]

depth

2

The maximum recursion depth

Returns

U[]

flat<U>(U[][][][], 3)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

function flat<U>(this: U[][][][], depth: 3)

Parameters

this

U[][][][]

depth

3

The maximum recursion depth

Returns

U[]

flat<U>(U[][][][][], 4)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

function flat<U>(this: U[][][][][], depth: 4)

Parameters

this

U[][][][][]

depth

4

The maximum recursion depth

Returns

U[]

flat<U>(U[][][][][][], 5)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

function flat<U>(this: U[][][][][][], depth: 5)

Parameters

this

U[][][][][][]

depth

5

The maximum recursion depth

Returns

U[]

flat<U>(U[][][][][][][], 6)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

function flat<U>(this: U[][][][][][][], depth: 6)

Parameters

this

U[][][][][][][]

depth

6

The maximum recursion depth

Returns

U[]

flat<U>(U[][][][][][][][], 7)

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

function flat<U>(this: U[][][][][][][][], depth: 7)

Parameters

this

U[][][][][][][][]

depth

7

The maximum recursion depth

Returns

U[]

flatMap<U>((this: This, value: Location, index: number, array: Location[]) => U | ReadonlyArray<U>, This)

Calls a defined callback function on each element of an array. Then, flattens the result into a new array. This is identical to a map followed by flat with depth 1.

function flatMap<U>(callback: (this: This, value: Location, index: number, array: Location[]) => U | ReadonlyArray<U>, thisArg?: This)

Parameters

callback

(this: This, value: Location, index: number, array: Location[]) => U | ReadonlyArray<U>

A function that accepts up to three arguments. The flatMap method calls the callback function one time for each element in the array.

thisArg

This

An object to which the this keyword can refer in the callback function. If thisArg is omitted, undefined is used as the this value.

Returns

U[]

forEach((value: Location, index: number, array: Location[]) => void, any)

Performs the specified action for each element in an array.

function forEach(callbackfn: (value: Location, index: number, array: Location[]) => void, thisArg?: any)

Parameters

callbackfn

(value: Location, index: number, array: Location[]) => void

A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

thisArg

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

includes(Location, undefined | number)

Determines whether an array includes a certain element, returning true or false as appropriate.

function includes(searchElement: Location, fromIndex?: undefined | number)

Parameters

searchElement
Location

The element to search for.

fromIndex

undefined | number

The position in this array at which to begin searching for searchElement.

Returns

boolean

indexOf(Location, undefined | number)

Returns the index of the first occurrence of a value in an array.

function indexOf(searchElement: Location, fromIndex?: undefined | number)

Parameters

searchElement
Location

The value to locate in the array.

fromIndex

undefined | number

The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

Returns

number

join(undefined | string)

Adds all the elements of an array separated by the specified separator string.

function join(separator?: undefined | string)

Parameters

separator

undefined | string

A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.

Returns

string

keys()

Returns an iterable of keys in the array

function keys()

Returns

IterableIterator<number>

lastIndexOf(Location, undefined | number)

Returns the index of the last occurrence of a specified value in an array.

function lastIndexOf(searchElement: Location, fromIndex?: undefined | number)

Parameters

searchElement
Location

The value to locate in the array.

fromIndex

undefined | number

The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.

Returns

number

map<U>((value: Location, index: number, array: Location[]) => U, any)

Calls a defined callback function on each element of an array, and returns an array that contains the results.

function map<U>(callbackfn: (value: Location, index: number, array: Location[]) => U, thisArg?: any)

Parameters

callbackfn

(value: Location, index: number, array: Location[]) => U

A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

thisArg

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns

U[]

pop()

Removes the last element from an array and returns it.

function pop()

Returns

Location | undefined

push(Location[])

Appends new elements to an array, and returns the new length of the array.

function push(items: Location[])

Parameters

items

Location[]

New elements of the Array.

Returns

number

reduce((previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location)

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

function reduce(callbackfn: (previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location)

Parameters

callbackfn

(previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location

A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

Returns

reduce((previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location, Location)

function reduce(callbackfn: (previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location, initialValue: Location)

Parameters

callbackfn

(previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location

initialValue
Location

Returns

reduce<U>((previousValue: U, currentValue: Location, currentIndex: number, array: Location[]) => U, U)

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

function reduce<U>(callbackfn: (previousValue: U, currentValue: Location, currentIndex: number, array: Location[]) => U, initialValue: U)

Parameters

callbackfn

(previousValue: U, currentValue: Location, currentIndex: number, array: Location[]) => U

A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

initialValue

U

If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

Returns

U

reduceRight((previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location)

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

function reduceRight(callbackfn: (previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location)

Parameters

callbackfn

(previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location

A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

Returns

reduceRight((previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location, Location)

function reduceRight(callbackfn: (previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location, initialValue: Location)

Parameters

callbackfn

(previousValue: Location, currentValue: Location, currentIndex: number, array: Location[]) => Location

initialValue
Location

Returns

reduceRight<U>((previousValue: U, currentValue: Location, currentIndex: number, array: Location[]) => U, U)

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

function reduceRight<U>(callbackfn: (previousValue: U, currentValue: Location, currentIndex: number, array: Location[]) => U, initialValue: U)

Parameters

callbackfn

(previousValue: U, currentValue: Location, currentIndex: number, array: Location[]) => U

A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

initialValue

U

If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

Returns

U

reverse()

Reverses the elements in an Array.

function reverse()

Returns

shift()

Removes the first element from an array and returns it.

function shift()

Returns

Location | undefined

slice(undefined | number, undefined | number)

Returns a section of an array.

function slice(start?: undefined | number, end?: undefined | number)

Parameters

start

undefined | number

The beginning of the specified portion of the array.

end

undefined | number

The end of the specified portion of the array.

Returns

some((value: Location, index: number, array: Location[]) => unknown, any)

Determines whether the specified callback function returns true for any element of an array.

function some(callbackfn: (value: Location, index: number, array: Location[]) => unknown, thisArg?: any)

Parameters

callbackfn

(value: Location, index: number, array: Location[]) => unknown

A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.

thisArg

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns

boolean

sort(undefined | (a: Location, b: Location) => number)

Sorts an array.

function sort(compareFn?: undefined | (a: Location, b: Location) => number)

Parameters

compareFn

undefined | (a: Location, b: Location) => number

The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.

Returns

this

splice(number, number, Location[])

Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

function splice(start: number, deleteCount: number, items: Location[])

Parameters

start

number

The zero-based location in the array from which to start removing elements.

deleteCount

number

The number of elements to remove.

items

Location[]

Elements to insert into the array in place of the deleted elements.

Returns

splice(number, undefined | number)

Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

function splice(start: number, deleteCount?: undefined | number)

Parameters

start

number

The zero-based location in the array from which to start removing elements.

deleteCount

undefined | number

The number of elements to remove.

Returns

toLocaleString()

Returns a string representation of an array. The elements are converted to string using their toLocalString methods.

function toLocaleString()

Returns

string

toString()

Returns a string representation of an array.

function toString()

Returns

string

unshift(Location[])

Inserts new elements at the start of an array.

function unshift(items: Location[])

Parameters

items

Location[]

Elements to insert at the start of the Array.

Returns

number

values()

Returns an iterable of values in the array

function values()

Returns

IterableIterator<Location>