This is a lossy conversion, since Flow requires that U is an object type and that T (1) has all the keys of U and (2) the corresponding values of T are assignable to those of U. A closer analogue would use OmitStrict instead of Omit (where type OmitStrict<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>) but using the standard Omit means we don't need to add potentially-conflicting definitions elsewhere to import here.
This is a lossy conversion, since Flow requires that
U
is an object type and thatT
(1) has all the keys ofU
and (2) the corresponding values ofT
are assignable to those ofU
. A closer analogue would useOmitStrict
instead ofOmit
(wheretype OmitStrict<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
) but using the standardOmit
means we don't need to add potentially-conflicting definitions elsewhere to import here.