mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 01:11:35 +00:00
!12007 Support collections.Array's splice
Merge pull request !12007 from hzzhouzebin/splice
This commit is contained in:
commit
95cbbaf83c
@ -636,6 +636,39 @@ declare namespace collections {
|
||||
* @since 12
|
||||
*/
|
||||
concat(...items: ConcatArray<T>[]): Array<T>;
|
||||
/**
|
||||
* Removes elements from the array at the specified position.
|
||||
*
|
||||
* @param { number } start - The zero-based index at which to start changing the contents of the array.
|
||||
* All the elements from start to the end of the array will be deleted.
|
||||
* @returns { Array<T> } An array containing the deleted elements.
|
||||
* @throws { BusinessError } 401 - Parameter error.Possible causes:
|
||||
* 1.Mandatory parameters are left unspecified.
|
||||
* 2.Incorrect parameter types.
|
||||
* @throws { BusinessError } 10200011 - The splice method cannot be bound.
|
||||
* @throws { BusinessError } 10200201 - Concurrent modification error.
|
||||
* @syscap SystemCapability.Utils.Lang
|
||||
* @since 12
|
||||
*/
|
||||
splice(start: number): Array<T>;
|
||||
/**
|
||||
* Removes elements from the array and, if necessary, inserts new elements at the specified position.
|
||||
*
|
||||
* @param { number } start - The zero-based index at which to start changing the contents of the array.
|
||||
* @param { number } deleteCount - The number of elements to remove from the array,
|
||||
* starting at the index specified by the start parameter.
|
||||
* @param { T[] } items - An array of elements to insert into the array,
|
||||
* starting at the index specified by the start parameter.
|
||||
* @returns { Array<T> } An array containing the deleted elements.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes:
|
||||
* 1.Mandatory parameters are left unspecified.
|
||||
* 2.Incorrect parameter types.
|
||||
* @throws { BusinessError } 10200011 - The splice method cannot be bound.
|
||||
* @throws { BusinessError } 10200201 - Concurrent modification error.
|
||||
* @syscap SystemCapability.Utils.Lang
|
||||
* @since 12
|
||||
*/
|
||||
splice(start: number, deleteCount: number, ...items: T[]): Array<T>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user