From cb23d157a671d0dc68006688c0ef7ea53dfe0357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20L=C3=B8nne?= Date: Wed, 8 Mar 2017 11:17:19 +0100 Subject: [PATCH] Corrects documentation in core-js Updates the documentation for Array.prototype.findIndex. findIndex returns -1 on failure, not undefined. --- core-js/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core-js/index.d.ts b/core-js/index.d.ts index 7dda59aab3..a0a10708d9 100644 --- a/core-js/index.d.ts +++ b/core-js/index.d.ts @@ -111,11 +111,11 @@ interface Array { find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; /** - * Returns the index of the first element in the array where predicate is true, and undefined + * Returns the index of the first element in the array where predicate is true, and -1 * otherwise. * @param predicate 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. + * immediately returns that element value. Otherwise, find returns -1. * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ @@ -827,7 +827,7 @@ interface PromiseConstructor { all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; all(values: Iterable>): Promise; - + /** * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved * or rejected.