OperationListResult interface
- 扩展
-
Array<Operation>
属性
Array | |
length | 获取或设置数组的长度。 这是比数组中定义的最高元素更高的数字。 |
next |
用于获取下一组作的 URL。 |
方法
属性详细信息
Array
Array: ArrayConstructor
属性值
ArrayConstructor
length
获取或设置数组的长度。 这是比数组中定义的最高元素更高的数字。
length: number
属性值
number
nextLink
用于获取下一组作的 URL。
nextLink?: undefined | string
属性值
undefined | string
方法详细信息
at(number)
获取整数值并返回该索引处的项,从而允许正整数和负整数。 负整数从数组中的最后一项计数回退。
function at(index: number)
参数
- index
-
number
返回
Operation | undefined
concat(ConcatArray<Operation>[])
合并两个或多个数组。
function concat(items: ConcatArray<Operation>[])
参数
- items
-
ConcatArray<Operation>[]
要添加到 array1 末尾的其他项。
返回
concat(T | ConcatArray<T>[])
合并两个或多个数组。
function concat(items: T | ConcatArray<T>[])
参数
- items
-
T | ConcatArray<T>[]
要添加到 array1 末尾的其他项。
返回
copyWithin(number, number, undefined | number)
在从位置目标开始到同一数组的开始和结尾复制数组部分后返回此对象
function copyWithin(target: number, start: number, end?: undefined | number)
参数
- target
-
number
如果目标为负数,则将其视为长度+目标,其中长度是数组的长度。
- start
-
number
如果 start 为负数,则被视为 length+start。 如果结束为负数,则被视为长度+结束。
- end
-
undefined | number
如果未指定,此对象的长度将用作其默认值。
返回
this
entries()
返回数组中每个条目的键值对的迭代值对
function entries()
返回
IterableIterator<Object>
every((value: Operation, index: number, array: Operation[]) => unknown, any)
确定数组的所有成员是否满足指定的测试。
function every(callbackfn: (value: Operation, index: number, array: Operation[]) => unknown, thisArg?: any)
参数
- callbackfn
-
(value: Operation, index: number, array: Operation[]) => unknown
最多接受三个参数的函数。 每个方法都会调用 array1 中每个元素的 callbackfn 函数,直到 callbackfn 返回 false,或直到数组的末尾。
- thisArg
-
any
此关键字可以在 callbackfn 函数中引用的对象。 如果省略 thisArg,则未定义将用作此值。
返回
boolean
fill(Operation, undefined | number, undefined | number)
在用值填充开头和结尾标识的节后返回此对象
function fill(value: Operation, start?: undefined | number, end?: undefined | number)
参数
- value
- Operation
要用
- start
-
undefined | number
要开始填充数组的索引。 如果 start 为负数,则被视为 length+start,其中长度是数组的长度。
- end
-
undefined | number
要停止填充数组的索引。 如果结束为负数,则被视为长度+结束。
返回
this
filter((value: Operation, index: number, array: Operation[]) => unknown, any)
返回满足回调函数中指定的条件的数组的元素。
function filter(callbackfn: (value: Operation, index: number, array: Operation[]) => unknown, thisArg?: any)
参数
- callbackfn
-
(value: Operation, index: number, array: Operation[]) => unknown
最多接受三个参数的函数。 筛选器方法为数组中的每个元素一次调用 callbackfn 函数。
- thisArg
-
any
此关键字可以在 callbackfn 函数中引用的对象。 如果省略 thisArg,则未定义将用作此值。
返回
filter<S>((value: Operation, index: number, array: Operation[]) => boolean, any)
返回满足回调函数中指定的条件的数组的元素。
function filter<S>(callbackfn: (value: Operation, index: number, array: Operation[]) => boolean, thisArg?: any)
参数
- callbackfn
-
(value: Operation, index: number, array: Operation[]) => boolean
最多接受三个参数的函数。 筛选器方法为数组中的每个元素一次调用 callbackfn 函数。
- thisArg
-
any
此关键字可以在 callbackfn 函数中引用的对象。 如果省略 thisArg,则未定义将用作此值。
返回
S[]
find((value: Operation, index: number, obj: Operation[]) => unknown, any)
function find(predicate: (value: Operation, index: number, obj: Operation[]) => unknown, thisArg?: any)
参数
- predicate
-
(value: Operation, index: number, obj: Operation[]) => unknown
- thisArg
-
any
返回
Operation | undefined
find<S>((this: void, value: Operation, index: number, obj: Operation[]) => boolean, any)
返回数组中谓词为 true 且未定义的第一个元素的值。
function find<S>(predicate: (this: void, value: Operation, index: number, obj: Operation[]) => boolean, thisArg?: any)
参数
- predicate
-
(this: void, value: Operation, index: number, obj: Operation[]) => boolean
查找数组的每个元素的调用谓词一次(升序),直到找到谓词返回 true 的元素。 如果找到此类元素,则查找将立即返回该元素值。 否则,查找将返回未定义。
- thisArg
-
any
如果提供,它将用作每个谓词调用的此值。 如果未提供,则改用未定义。
返回
S | undefined
findIndex((value: Operation, index: number, obj: Operation[]) => unknown, any)
返回数组中谓词为 true 的第一个元素的索引,否则 -1。
function findIndex(predicate: (value: Operation, index: number, obj: Operation[]) => unknown, thisArg?: any)
参数
- predicate
-
(value: Operation, index: number, obj: Operation[]) => unknown
查找数组的每个元素的调用谓词一次(升序),直到找到谓词返回 true 的元素。 如果找到此类元素,findIndex 将立即返回该元素索引。 否则,findIndex 返回 -1。
- thisArg
-
any
如果提供,它将用作每个谓词调用的此值。 如果未提供,则改用未定义。
返回
number
flat<U>(undefined | number)
返回一个新数组,其中所有子数组元素以递归方式连接到指定深度。 如果未提供深度,则平面方法默认为深度 1。
function flat<U>(depth?: undefined | number)
参数
- depth
-
undefined | number
最大递归深度
返回
any[]
flat<U>(U[], 0)
返回一个新数组,其中所有子数组元素以递归方式连接到指定深度。
function flat<U>(this: U[], depth: 0)
参数
- this
-
U[]
- depth
-
0
最大递归深度
返回
U[]
flat<U>(U[][], undefined | 1)
返回一个新数组,其中所有子数组元素以递归方式连接到指定深度。
function flat<U>(this: U[][], depth?: undefined | 1)
参数
- this
-
U[][]
- depth
-
undefined | 1
最大递归深度
返回
U[]
flat<U>(U[][][], 2)
返回一个新数组,其中所有子数组元素以递归方式连接到指定深度。
function flat<U>(this: U[][][], depth: 2)
参数
- this
-
U[][][]
- depth
-
2
最大递归深度
返回
U[]
flat<U>(U[][][][], 3)
返回一个新数组,其中所有子数组元素以递归方式连接到指定深度。
function flat<U>(this: U[][][][], depth: 3)
参数
- this
-
U[][][][]
- depth
-
3
最大递归深度
返回
U[]
flat<U>(U[][][][][], 4)
返回一个新数组,其中所有子数组元素以递归方式连接到指定深度。
function flat<U>(this: U[][][][][], depth: 4)
参数
- this
-
U[][][][][]
- depth
-
4
最大递归深度
返回
U[]
flat<U>(U[][][][][][], 5)
返回一个新数组,其中所有子数组元素以递归方式连接到指定深度。
function flat<U>(this: U[][][][][][], depth: 5)
参数
- this
-
U[][][][][][]
- depth
-
5
最大递归深度
返回
U[]
flat<U>(U[][][][][][][], 6)
返回一个新数组,其中所有子数组元素以递归方式连接到指定深度。
function flat<U>(this: U[][][][][][][], depth: 6)
参数
- this
-
U[][][][][][][]
- depth
-
6
最大递归深度
返回
U[]
flat<U>(U[][][][][][][][], 7)
返回一个新数组,其中所有子数组元素以递归方式连接到指定深度。
function flat<U>(this: U[][][][][][][][], depth: 7)
参数
- this
-
U[][][][][][][][]
- depth
-
7
最大递归深度
返回
U[]
flatMap<U>((this: This, value: Operation, index: number, array: Operation[]) => U | ReadonlyArray<U>, This)
对数组的每个元素调用定义的回调函数。 然后,将结果平展到新的数组中。 这与地图后跟深度为 1 的平面图相同。
function flatMap<U>(callback: (this: This, value: Operation, index: number, array: Operation[]) => U | ReadonlyArray<U>, thisArg?: This)
参数
- callback
-
(this: This, value: Operation, index: number, array: Operation[]) => U | ReadonlyArray<U>
最多接受三个参数的函数。 flatMap 方法为数组中的每个元素调用回调函数一次。
- thisArg
-
This
此关键字可以在回调函数中引用的对象。 如果省略 thisArg,则未定义将用作此值。
返回
U[]
forEach((value: Operation, index: number, array: Operation[]) => void, any)
对数组中的每个元素执行指定的作。
function forEach(callbackfn: (value: Operation, index: number, array: Operation[]) => void, thisArg?: any)
参数
- callbackfn
-
(value: Operation, index: number, array: Operation[]) => void
最多接受三个参数的函数。 forEach 为数组中的每个元素调用一次 callbackfn 函数。
- thisArg
-
any
此关键字可以在 callbackfn 函数中引用的对象。 如果省略 thisArg,则未定义将用作此值。
includes(Operation, undefined | number)
确定数组是否包含特定元素,并根据需要返回 true 还是 false。
function includes(searchElement: Operation, fromIndex?: undefined | number)
参数
- searchElement
- Operation
要搜索的元素。
- fromIndex
-
undefined | number
此数组中开始搜索 searchElement 的位置。
返回
boolean
indexOf(Operation, undefined | number)
返回数组中值的第一个匹配项的索引。
function indexOf(searchElement: Operation, fromIndex?: undefined | number)
参数
- searchElement
- Operation
要在数组中查找的值。
- fromIndex
-
undefined | number
开始搜索的数组索引。 如果省略 fromIndex,则搜索从索引 0 开始。
返回
number
join(undefined | string)
添加由指定分隔符字符串分隔的数组的所有元素。
function join(separator?: undefined | string)
参数
- separator
-
undefined | string
一个字符串,用于将数组的一个元素与生成的 String 中的下一个元素分开。 如果省略,则用逗号分隔数组元素。
返回
string
keys()
返回数组中的键可迭代
function keys()
返回
IterableIterator<number>
lastIndexOf(Operation, undefined | number)
返回数组中指定值的最后一个匹配项的索引。
function lastIndexOf(searchElement: Operation, fromIndex?: undefined | number)
参数
- searchElement
- Operation
要在数组中查找的值。
- fromIndex
-
undefined | number
开始搜索的数组索引。 如果省略 fromIndex,则搜索从数组中的最后一个索引开始。
返回
number
map<U>((value: Operation, index: number, array: Operation[]) => U, any)
对数组的每个元素调用定义的回调函数,并返回一个包含结果的数组。
function map<U>(callbackfn: (value: Operation, index: number, array: Operation[]) => U, thisArg?: any)
参数
- callbackfn
-
(value: Operation, index: number, array: Operation[]) => U
最多接受三个参数的函数。 map 方法为数组中的每个元素调用一次 callbackfn 函数。
- thisArg
-
any
此关键字可以在 callbackfn 函数中引用的对象。 如果省略 thisArg,则未定义将用作此值。
返回
U[]
pop()
push(Operation[])
reduce((previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation)
为数组中的所有元素调用指定的回调函数。 回调函数的返回值是累积的结果,并在下一次调用回调函数时作为参数提供。
function reduce(callbackfn: (previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation)
参数
- callbackfn
-
(previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation
最多接受四个参数的函数。 reduce 方法每次调用数组中每个元素的 callbackfn 函数。
返回
reduce((previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation, Operation)
function reduce(callbackfn: (previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation, initialValue: Operation)
参数
- callbackfn
-
(previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation
- initialValue
- Operation
返回
reduce<U>((previousValue: U, currentValue: Operation, currentIndex: number, array: Operation[]) => U, U)
为数组中的所有元素调用指定的回调函数。 回调函数的返回值是累积的结果,并在下一次调用回调函数时作为参数提供。
function reduce<U>(callbackfn: (previousValue: U, currentValue: Operation, currentIndex: number, array: Operation[]) => U, initialValue: U)
参数
- callbackfn
-
(previousValue: U, currentValue: Operation, currentIndex: number, array: Operation[]) => U
最多接受四个参数的函数。 reduce 方法每次调用数组中每个元素的 callbackfn 函数。
- initialValue
-
U
如果指定 initialValue,则将其用作启动累积的初始值。 对 callbackfn 函数的第一次调用将此值作为参数而不是数组值提供。
返回
U
reduceRight((previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation)
按降序调用数组中所有元素的指定回调函数。 回调函数的返回值是累积的结果,并在下一次调用回调函数时作为参数提供。
function reduceRight(callbackfn: (previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation)
参数
- callbackfn
-
(previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation
最多接受四个参数的函数。 reduceRight 方法为数组中的每个元素调用回调fn 函数一次。
返回
reduceRight((previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation, Operation)
function reduceRight(callbackfn: (previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation, initialValue: Operation)
参数
- callbackfn
-
(previousValue: Operation, currentValue: Operation, currentIndex: number, array: Operation[]) => Operation
- initialValue
- Operation
返回
reduceRight<U>((previousValue: U, currentValue: Operation, currentIndex: number, array: Operation[]) => U, U)
按降序调用数组中所有元素的指定回调函数。 回调函数的返回值是累积的结果,并在下一次调用回调函数时作为参数提供。
function reduceRight<U>(callbackfn: (previousValue: U, currentValue: Operation, currentIndex: number, array: Operation[]) => U, initialValue: U)
参数
- callbackfn
-
(previousValue: U, currentValue: Operation, currentIndex: number, array: Operation[]) => U
最多接受四个参数的函数。 reduceRight 方法为数组中的每个元素调用回调fn 函数一次。
- initialValue
-
U
如果指定 initialValue,则将其用作启动累积的初始值。 对 callbackfn 函数的第一次调用将此值作为参数而不是数组值提供。
返回
U
reverse()
shift()
slice(undefined | number, undefined | number)
返回数组的一部分。
function slice(start?: undefined | number, end?: undefined | number)
参数
- start
-
undefined | number
数组的指定部分的开头。
- end
-
undefined | number
数组指定部分的末尾。
返回
some((value: Operation, index: number, array: Operation[]) => unknown, any)
确定指定的回调函数是否为数组的任何元素返回 true。
function some(callbackfn: (value: Operation, index: number, array: Operation[]) => unknown, thisArg?: any)
参数
- callbackfn
-
(value: Operation, index: number, array: Operation[]) => unknown
最多接受三个参数的函数。 某些方法调用 array1 中每个元素的 callbackfn 函数,直到 callbackfn 返回 true,或直到数组的末尾。
- thisArg
-
any
此关键字可以在 callbackfn 函数中引用的对象。 如果省略 thisArg,则未定义将用作此值。
返回
boolean
sort(undefined | (a: Operation, b: Operation) => number)
对数组进行排序。
function sort(compareFn?: undefined | (a: Operation, b: Operation) => number)
参数
- compareFn
-
undefined | (a: Operation, b: Operation) => number
用于确定元素顺序的函数的名称。 如果省略,则按升序 ASCII 字符顺序对元素进行排序。
返回
this
splice(number, number, Operation[])
从数组中删除元素,并在必要时在其位置插入新元素,并返回已删除的元素。
function splice(start: number, deleteCount: number, items: Operation[])
参数
- start
-
number
数组中从零开始删除元素的位置。
- deleteCount
-
number
要移除的元素数。
- items
要插入数组中的元素代替已删除的元素。
返回
splice(number, undefined | number)
从数组中删除元素,并在必要时在其位置插入新元素,并返回已删除的元素。
function splice(start: number, deleteCount?: undefined | number)
参数
- start
-
number
数组中从零开始删除元素的位置。
- deleteCount
-
undefined | number
要移除的元素数。
返回
toLocaleString()
返回数组的字符串表示形式。 元素使用其 toLocalString 方法转换为字符串。
function toLocaleString()
返回
string
toString()
返回数组的字符串表示形式。
function toString()
返回
string