form-graph
    Preparing search index...

    Function enumOf

    • A closed option set. gate is the single-declaration availability rule (helper-level sugar, not a core mechanism): a string gates that option — rendered disabled AND, if the value sits on it, corrected to the first open option with the string as the reason.

      Type Parameters

      • const T extends string | number

      Parameters

      • cfg: {
            default: T;
            gate?: Partial<Record<T, string | false | null | undefined>>;
            options: EnumDefOption<T>[];
        }

      Returns FieldDef<T, EnumDefMeta<T>, RefinableSchema<T>>