diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index f5ef627080..027c48aa34 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -1678,7 +1678,7 @@ declare namespace R { * Returns a list containing the names of all the enumerable own * properties of the supplied object. */ - keys(x: T): keyof T[]; + keys(x: T): Array; keys(x: T): string[]; /** diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 5c4a5ea1c0..6efc51d930 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -1026,10 +1026,10 @@ type Pair = KeyValuePair; */ () => { - const objKeys = R.keys({a: 1, b: 2, c: 3}); // => ['a', 'b', 'c'] - const numberKeys = R.keys(1); - const arrayKeys = R.keys([]); - const stringKeys = R.keys('foo'); + const objKeys = R.keys({a: 1, b: 2, c: 3}); // $ExpectType ("a" | "b" | "c")[] + const numberKeys = R.keys(1); // $ExpectType string[] + const arrayKeys = R.keys([]); // List of array members + const stringKeys = R.keys('foo'); // $ExpectType string[] }; () => {