Skip to content

Commit

Permalink
Ramda improvements (flow-typed#407)
Browse files Browse the repository at this point in the history
* Add more gappy partial application tests for ramda

* Use existing ramda defs with Flow 0.30 too

They work with 0.30 too, but not 0.31.
  • Loading branch information
dchambers authored and marudor committed Oct 23, 2016
1 parent 06d6c5d commit 2775e62
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ const objMixed: {[k:string]:mixed} = { a: 1, c: 'd' }
const os: Array<{[k:string]: *}> = [ { a: 1, c: 'd' }, { b: 2 } ]
const str: string = 'hello world'

const g = _.propIs
const __ = _.__
const g1: boolean = g(1, '2', {p: 3})
const g2: boolean = g(__, '2', {p: 3})(1)
const g3: boolean = g(__, __, {p: 3})(1)('2')
const g4: boolean = g(__, __, {p: 3})(1, '2')
const g5: boolean = g(__, '2', __)(1, {p: 3})
const g6: boolean = g(__, '2')(1)({p: 3})
const g7: boolean = g(__, '2')(1, {p: 3})
const g8: boolean = g(__, '2')(__, {p: 3})(1)

type R = {
sum: number,
nested: { mul: number },
Expand Down

0 comments on commit 2775e62

Please sign in to comment.