diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index 7fde62feee..81976e8e6d 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for ramda // Project: https://github.com/donnut/typescript-ramda -// Definitions by: Erwin Poeze , Matt DeKrey , Liam Goodacre +// Definitions by: Erwin Poeze , Matt DeKrey , Liam Goodacre , Matt Dziuban // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -1598,7 +1598,7 @@ declare namespace R { * function and returns its result. Note that for effective composition with this function, both the tryer and * catcher functions must return the same type of results. */ - tryCatch(tryer: (...args: any[]) => T, catcher: (...args: any[]) => T, x: any): T; + tryCatch(tryer: (...args: any[]) => T, catcher: (...args: any[]) => T): (...args: any[]) => T; /** * Gives a single-word string description of the (native) type of a value, returning such answers as 'Object', diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 5c5948b047..e60f3afa79 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -972,8 +972,9 @@ type Pair = KeyValuePair () => { const x = R.prop('x'); - const a: boolean = R.tryCatch(R.prop('x'), R.F, {x: true}); //=> true - const b: boolean = R.tryCatch(R.prop('x'), R.F, null); //=> false + const a: boolean = R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true + const b: boolean = R.tryCatch(R.prop('x'), R.F)(null); //=> false + const c: boolean = R.tryCatch(R.and, R.F)(true, true); //=> true } () => {