From 0cdd6e31cbd6098be791ebf9b6cc95b5c97c29dd Mon Sep 17 00:00:00 2001 From: Timo <36011879+Bodlux@users.noreply.github.com> Date: Tue, 14 Apr 2026 23:09:25 +0000 Subject: [PATCH] fix(lib): add missing -1 return documentation for Array indexOf/lastIndexOf The Array interface's indexOf and lastIndexOf JSDoc descriptions are missing the ", or -1 if it is not present" clause that is consistently present in ReadonlyArray and all TypedArray interfaces. --- src/lib/es5.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index ced21a6d72af1..de8b00018e8d5 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1205,13 +1205,13 @@ interface ReadonlyArray { */ slice(start?: number, end?: number): T[]; /** - * Returns the index of the first occurrence of a value in an array. + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. */ indexOf(searchElement: T, fromIndex?: number): number; /** - * Returns the index of the last occurrence of a specified value in an array. + * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. */