@@ -343,6 +343,30 @@ interface ObjectConstructor {
343
343
defineProperty ( o : any , propertyKey : PropertyKey , attributes : PropertyDescriptor ) : any ;
344
344
}
345
345
346
+ interface ReadonlyArray < T > {
347
+ /**
348
+ * Returns the value of the first element in the array where predicate is true, and undefined
349
+ * otherwise.
350
+ * @param predicate find calls predicate once for each element of the array, in ascending
351
+ * order, until it finds one where predicate returns true. If such an element is found, find
352
+ * immediately returns that element value. Otherwise, find returns undefined.
353
+ * @param thisArg If provided, it will be used as the this value for each invocation of
354
+ * predicate. If it is not provided, undefined is used instead.
355
+ */
356
+ find ( predicate : ( value : T , index : number , obj : ReadonlyArray < T > ) => boolean , thisArg ?: any ) : T | undefined ;
357
+
358
+ /**
359
+ * Returns the index of the first element in the array where predicate is true, and undefined
360
+ * otherwise.
361
+ * @param predicate find calls predicate once for each element of the array, in ascending
362
+ * order, until it finds one where predicate returns true. If such an element is found,
363
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
364
+ * @param thisArg If provided, it will be used as the this value for each invocation of
365
+ * predicate. If it is not provided, undefined is used instead.
366
+ */
367
+ findIndex ( predicate : ( value : T ) => boolean , thisArg ?: any ) : number ;
368
+ }
369
+
346
370
interface RegExp {
347
371
/**
348
372
* Returns a string indicating the flags of the regular expression in question. This field is read-only.
0 commit comments