@versatiles/style
    Preparing search index...

    Type Alias ValidationResult<T>

    ValidationResult:
        | { issues: readonly []; ok: true; options: T }
        | { issues: readonly OptionIssue[]; ok: false }

    What validateOptions gives back: the resolved options, or everything wrong with them.

    A discriminated union rather than { issues, options? }, so a caller that checks ok gets the resolved options without a second narrowing step, and one that forgets cannot read an options that was never produced.

    Type Parameters

    • T