WithFieldValue
Allows FieldValues to be passed in as a property value while maintaining type safety.
type WithFieldValue<T> = T | (T extends Primitive ? T : T extends {} ? [K in keyof T]: WithFieldValue<T[K]> | FieldValue : never);
§Type
§
T | (T extends Primitive ? T : T extends {} ? [K in keyof T]: WithFieldValue<T[K]> | FieldValue : never)
[src]