diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 8ef80d60e1..7301b28aae 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -18,6 +18,7 @@ // Jack Leigh // Keagan McClelland // Tomas Szabo +// Bonggyun Lee // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -1489,6 +1490,7 @@ declare namespace R { * Reasonable analog to SQL `select` statement. */ project(props: ReadonlyArray, objs: ReadonlyArray): U[]; + project(props: ReadonlyArray): (objs: ReadonlyArray) => U[]; /** * Returns a function that when supplied an object returns the indicated property of that object, if it exists. diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 0133f82e95..8cbbf9ceac 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -1619,6 +1619,7 @@ class Rectangle { const fred = {name: "Fred", age: 12, hair: "brown", grade: 7}; const kids = [abby, fred]; R.project(["name", "grade"], kids); // => [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}] + R.project(["name", "grade"])(kids); // => [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}] }; () => {