diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 3b4fc67711..926592281d 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -1131,10 +1131,12 @@ declare namespace R { inc(n: number): number; /** - * Given a target, this function checks a list for a target and returns a boolean. + * Given a target, this function checks a list or string for a target and returns a boolean. */ includes(target: T, list: ReadonlyArray): boolean; includes(target: T): (list: ReadonlyArray) => boolean; + includes(target: T, list: string): boolean; + includes(target: T): (list: string) => boolean; /** * Given a function that generates a key, turns a list of objects into an object indexing the objects diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index e02f5605e8..2e4bccae91 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -973,7 +973,9 @@ interface Obj { () => { R.includes(8, [1, 8]); // => true - R.includes(10)([1, 2, 3, 4]); // => false + R.includes(10)([2, 3, 5, 8]); // => false + R.includes('ba', 'kiwi'); //=>false + R.includes('ba', 'banana'); //=>true }; () => {