Created
June 19, 2018 09:15
-
-
Save devCola/1149df6f3f87ea1387c88d5e8e4634f3 to your computer and use it in GitHub Desktop.
ramda currying typescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// yarn add ramda @types-ramda | |
import { | |
curry, | |
} from 'ramda'; | |
function test(a: string, b: number, c: boolean) { | |
// ... | |
} | |
const curried1 = curry(test); | |
// typeof curried1: R.CurriedFunction3<string, number, boolean, void> | |
const curried2 = curried1('hello', 3); | |
// typeof curried2: (t3: boolean) => void | |
curried2(false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment