From be5680c087e2663b31767bcb38efdf75731a1533 Mon Sep 17 00:00:00 2001 From: YanagiEiichi Date: Fri, 10 Apr 2020 22:13:48 +0800 Subject: [PATCH] narrowing return type of "array.includes" --- lib/lib.es2016.array.include.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/lib.es2016.array.include.d.ts b/lib/lib.es2016.array.include.d.ts index 6bc6ef30e7e42..f40ddb487f5c1 100644 --- a/lib/lib.es2016.array.include.d.ts +++ b/lib/lib.es2016.array.include.d.ts @@ -25,6 +25,7 @@ interface Array { * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: T, fromIndex?: number): boolean; + includes(searchElement: T, fromIndex?: number): searchElement is T; } interface ReadonlyArray { @@ -34,6 +35,7 @@ interface ReadonlyArray { * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: T, fromIndex?: number): boolean; + includes(searchElement: T, fromIndex?: number): searchElement is T; } interface Int8Array {