export type NonNullableProps = { [P in keyof T]: NonNullable; }; export type NullableProps = { [P in keyof T]: T[P] | null; }; /** * Return nullable/partial for shared keys between T1 and T2, * return non-nullable/required for keys T2 possesses that T1 does not. */ export type RequiredDifference = NonNullableProps>> & NullableProps>>; /** * Merge any properties of T1 that are non-optional into T2 * otherwise use type of T2. Returns as a modified union of both types. */ export type MergeNonOptionalFieldsIntoSimilarTypeAsUnion = { [P in keyof (T1 | T2)]?: Extract | undefined extends T1[P] ? T2[P] : T1[P]; }; /** * Merge any properties of T1 that are non-optional into T2 * otherwise use type of T2. Returns as T2 with non-intersecting * properties left intact. */ export type MergeNonOptionalFieldsIntoSimilarType = Omit & MergeNonOptionalFieldsIntoSimilarTypeAsUnion; //# sourceMappingURL=types.d.ts.map