https://linear.app/comm/issue/ENG-10205/update-flow-to-02691
failUnmentioned is an object:
+failUnmentioned?: Partial<{
+threadInfos: boolean,
+entryInfos: boolean,
+userInfos: boolean,
}>,so when we do this:
failUnmentioned?.[spec.hashKey]
where hashKey is a string, flow throws an error.
We can type hashKey:
export type StateSyncSpec<Infos, Info, Inconsistencies> = {
+hashKey: 'threadInfos' | 'entryInfos' | 'userInfos',but hashKey might be also 'currentUserInfo' (see currentUserStateSyncSpec) and it's not present in failUnmentioned so we get the same error as the one at the beginning.
If there is no hashKey in failUnmentioned nothing is broken so I guess it's fine to ignore this error, unless anyone has a better idea.
Depends on D15098