Skip to content

Commit 87740bc

Browse files
authored
Fix for Issue 61081 (#61221)
1 parent 833a8d4 commit 87740bc

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

src/lib/es5.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,14 +1378,18 @@ interface Array<T> {
13781378
/**
13791379
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
13801380
* @param start The zero-based location in the array from which to start removing elements.
1381-
* @param deleteCount The number of elements to remove.
1381+
* @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start
1382+
* paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type
1383+
* that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements.
13821384
* @returns An array containing the elements that were deleted.
13831385
*/
13841386
splice(start: number, deleteCount?: number): T[];
13851387
/**
13861388
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
13871389
* @param start The zero-based location in the array from which to start removing elements.
1388-
* @param deleteCount The number of elements to remove.
1390+
* @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero,
1391+
* undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and
1392+
* not remove any elements.
13891393
* @param items Elements to insert into the array in place of the deleted elements.
13901394
* @returns An array containing the elements that were deleted.
13911395
*/

tests/baselines/reference/completionEntryForUnionMethod.baseline

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4404,7 +4404,7 @@
44044404
"kind": "space"
44054405
},
44064406
{
4407-
"text": "The number of elements to remove.",
4407+
"text": "The number of elements to remove. Omitting this argument will remove all elements from the start\nparamater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type\nthat cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements.",
44084408
"kind": "text"
44094409
}
44104410
]

tests/baselines/reference/goToTypeDefinition_arrayType.baseline.jsonc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,18 @@
8787
// /**
8888
// * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
8989
// * @param start The zero-based location in the array from which to start removing elements.
90-
// * @param deleteCount The number of elements to remove.
90+
// * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start
91+
// * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type
92+
// * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements.
9193
// * @returns An array containing the elements that were deleted.
9294
// */
9395
// splice(start: number, deleteCount?: number): T[];
9496
// /**
9597
// * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
9698
// * @param start The zero-based location in the array from which to start removing elements.
97-
// * @param deleteCount The number of elements to remove.
99+
// * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero,
100+
// * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and
101+
// * not remove any elements.
98102
// * @param items Elements to insert into the array in place of the deleted elements.
99103
// * @returns An array containing the elements that were deleted.
100104
// */
@@ -340,14 +344,18 @@
340344
// /**
341345
// * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
342346
// * @param start The zero-based location in the array from which to start removing elements.
343-
// * @param deleteCount The number of elements to remove.
347+
// * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start
348+
// * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type
349+
// * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements.
344350
// * @returns An array containing the elements that were deleted.
345351
// */
346352
// splice(start: number, deleteCount?: number): T[];
347353
// /**
348354
// * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
349355
// * @param start The zero-based location in the array from which to start removing elements.
350-
// * @param deleteCount The number of elements to remove.
356+
// * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero,
357+
// * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and
358+
// * not remove any elements.
351359
// * @param items Elements to insert into the array in place of the deleted elements.
352360
// * @returns An array containing the elements that were deleted.
353361
// */

0 commit comments

Comments
 (0)