Я получаю эту ошибку потока:
[Flow]
alertModal: RecordFactory<AlertModalState>
Missing type annotation for `Values`. `Values` is a type parameter declared in function type [1] and was implicitly instantiated at call of `Record` [2]. (References: [1] [2])
по этому коду:
export const makeFormControls = Record({
alertModal: new alertModal()
})
Вот весь код:
//@flow
import type { RecordOf } from 'immutable'
import { Record } from 'immutable'
export type AlertModalState = {
isOpen: boolean,
title: string,
message: string,
height: number,
hasYesNo: boolean,
yesFunction: string
}
export const alertModal: RecordFactory<AlertModalState> = Record({
isOpen: false,
title: '',
message: '',
height: 0,
hasYesNo: false,
yesFunction: ''
})
export type AlertModalRecord = RecordOf<AlertModalState>
type FormControlsProps = {
alertModal: AlertModalRecord
}
export const makeFormControls = Record({
alertModal: new alertModal()
})
export type FormControls = RecordOf<FormControlsProps>
Почему поток жалуется, что какой-то Values
параметр объявлен и неявно создан?