@@ -4,17 +4,29 @@ interface Array<T> {
4
4
* @param searchElement The element to search for.
5
5
* @param fromIndex The position in this array at which to begin searching for searchElement.
6
6
*/
7
- includes ( searchElement : T , fromIndex ?: number ) : boolean ;
7
+ includes ( searchElement : unknown , fromIndex ?: number ) : searchElement is T ;
8
8
}
9
+ // /**
10
+ // * Determines whether an array includes a certain element, returning true or false as appropriate.
11
+ // * @param searchElement The element to search for.
12
+ // * @param fromIndex The position in this array at which to begin searching for searchElement.
13
+ // */
14
+ // includes(searchElement: T, fromIndex?: number): boolean;
9
15
10
16
interface ReadonlyArray < T > {
11
17
/**
12
18
* Determines whether an array includes a certain element, returning true or false as appropriate.
13
19
* @param searchElement The element to search for.
14
20
* @param fromIndex The position in this array at which to begin searching for searchElement.
15
21
*/
16
- includes ( searchElement : T , fromIndex ?: number ) : boolean ;
22
+ includes ( searchElement : unknown , fromIndex ?: number ) : searchElement is T ;
17
23
}
24
+ // /**
25
+ // * Determines whether an array includes a certain element, returning true or false as appropriate.
26
+ // * @param searchElement The element to search for.
27
+ // * @param fromIndex The position in this array at which to begin searching for searchElement.
28
+ // */
29
+ // includes(searchElement: T, fromIndex?: number): boolean;
18
30
19
31
interface Int8Array {
20
32
/**
0 commit comments