numeric-quantity - v3.3.1
    Preparing search index...

    Type Alias NumericQuantityReturnType<T>

    NumericQuantityReturnType: boolean extends VerboseOption<T>
        ? number | bigint | NumericQuantityVerboseResult
        : true extends VerboseOption<T>
            ? NumericQuantityVerboseResult
            : boolean extends BigIntOnOverflowOption<T>
                ? number | bigint
                : true extends BigIntOnOverflowOption<T> ? number | bigint : number

    Resolves the return type of numericQuantity based on the options provided.

    Type Parameters

    Inference requires the options object to have literal types. An options object annotated as const opts: NumericQuantityOptions = { ... } widens every option to boolean | undefined, so the return type is the full number | bigint | NumericQuantityVerboseResult union. Use satisfies NumericQuantityOptions instead of a : annotation to retain literal inference.