I see the following record type code:
type AppProps = {
+fetches: Map<string, number>,
};
export const makeApp: RecordFactory<AppProps> = Immutable.Record({
fetches: Immutable.Map()
});
export type App = RecordOf<AppProps>;
Now I have a call that uses the record's update function:
const state = makeApp({});
const result = state.update('fetches', val =>
val.set(action.meta.actionBase, 1)
);
All unit tests pass, behaviour is good, but I get a flow error:
Error:(40, 18) Missing type annotation for
T.Tis a type parameter declared inRecordInstance[1] and was implicitly instantiated at call of methodupdate[2].
I have an idea what is going on here, but I don't know flow well known to actually fix this, or even come up with a workaround. Please help!
ImmutableJS version "immutable": "^4.0.0-rc.12",