devtypes - v1.1.0
    Preparing search index...

    Type Alias RequireNone<T, K>

    RequireNone: Omit<T, K> & Partial<Record<K, never>>

    Require none of the specified properties.

    Type Parameters

    • T

      Source object type

    • K extends keyof T

      Keys that must not be present

    1.1.0

    Explicitly disallows a set of properties by forcing them to never. Useful for mutually exclusive object shapes.

    type Test = { a?: string; b?: number; c: boolean };
    type Result = RequireNone< Test, 'a' | 'b' >;
    // { c: boolean; a?: never; b?: never; }