diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index a40bab0b64..aa8b8cec66 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -1644,10 +1644,12 @@ declare namespace R { /** * Splits a given list or string at a given index. */ - splitAt(index: number, list: T): T[]; - splitAt(index: number): (list: T) => T[]; - splitAt(index: number, list: ReadonlyArray): T[][]; - splitAt(index: number): (list: ReadonlyArray) => T[][]; + splitAt(index: number, list: ReadonlyArray): [T[], T[]]; + splitAt(index: number, list: string): [string, string]; + splitAt(index: number): { + (list: ReadonlyArray): [T[], T[]]; + (list: string): [string, string]; + }; /** * Splits a collection into slices of the specified length. diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 321242da00..e25048b768 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -1899,6 +1899,7 @@ class Rectangle { const b: number[][] = R.splitAt(1)([1, 2, 3]); // => [[1], [2, 3]] const c: string[] = R.splitAt(5, "hello world"); // => ['hello', ' world'] const d: string[] = R.splitAt(-1, "foobar"); // => ['fooba', 'r'] + const e: string[] = R.splitAt(-1)("foobar"); // => ['fooba', 'r'] }; () => {