Skip to content

Instantly share code, notes, and snippets.

@dimitarg
Created March 24, 2017 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimitarg/ff35702ee2b1efa9cdabc1de2c776348 to your computer and use it in GitHub Desktop.
Save dimitarg/ff35702ee2b1efa9cdabc1de2c776348 to your computer and use it in GitHub Desktop.
//@flow
declare var test: any
declare var expect: any
import {Seq} from "immutable"
test("hmmm", () => {
const xs : Seq<number, string> = Seq.of("a", "b", "c")
// this does not typecheck, map not found in Seq
const ys : Seq<number, string> = xs.map(x => x + x)
// map is in fact in seq, the following assertion passes
expect(ys.toJS()).toEqual(["aa", "bb", "cc"])
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment