Allow model types to be defined with fields typed as Object as Maps and convert them into Immutable.Maps. For instance, a model type defined like this:
export type MyModelType = {
field: { [key: string]: number },
};
would create code like the following.
fromJS
state.field = Immutable.Map(state.field);
getter
get field(): Immutable.Map<string, number> {
return this._state.get('field');
}
setter
setField(field: Immutable.Map<string, number>): My {
return new My(this._state.set('field', field));
}
Allow model types to be defined with fields typed as Object as Maps and convert them into Immutable.Maps. For instance, a model type defined like this:
would create code like the following.
fromJS
getter
setter