I have use immutable version 3.8.2 and it 's woring correcly with typescript.
import {Map} from 'immutable';
const map1 = Map( {a: 1, b: 4, c: 3 })
const map2 = map1.set('b', 2)
stackblitz typescript demo
Import map function like this import {Map} from 'immutable';
will conflict with javascript ES2015 Map so you cant use both of theme to solve this you can use another variable or alias to hold immutable map function like this
import {Map as _map} from 'immutable';
const map1 = _map( {a: 1, b: 4, c: 3 })
const map2 = map1.set('b', 2)
you can import entire immutable module mean all immutable function like this
import * as immutable from 'immutable';
const map1 = immutable.Map( {a: 1, b: 4, c: 3 })
const map2 = map1.set('b', 2)
ctrl + c
to shut it down – Beatifictsd.d.ts
the compiler doesn't block but i get syntax errors for every function/class that i use fromimmutable.js
– Beatific