This code in typescript:
const b
if (a == true) {
b = [1]
} else {
b = [2]
}
how to convert above code to immutable.js ?
You have two options:
let b
if (a) {
b = List([1])
} else {
b = List([2])
}
//or
const b = a ? List([1]) : List([2])