Closed
Description
I were struggling with converting a model of ours to a Immutable.Map and found Record, which is perfect because we need to implement some functions.
But It doesn't seem to be possible to use the example syntax i Typescript?
import Immutable = require("immutable");
class ABRecord extends Immutable.Record({ a: 1, b: 2 }) {
getAB() {
return this.a + this.b;
}
}
var myRecord = new ABRecord(b:3);
myRecord.getAB();// 4
Doesn't compile at all, "The property 'Record' does not exist on value of type 'Immutable'."
Any tips?
Metadata
Metadata
Assignees
Labels
No labels