Skip to main content

Type Alias: RequireAllOrNoneFields<T>

type RequireAllOrNoneFields<T> =
{ [K in keyof T]-?: NonNullable<T[K]> } | { [K in keyof T]?: undefined };

Defined in: src/types/typeUtils.ts:8

Utility types for strict type-level invariants.

Type Parametersโ€‹

Tโ€‹

T extends object

Remarksโ€‹

This mirrors the behavior of type-fest's RequireAllOrNone without introducing redundant intersection constituents that trip our lint rules.