@neutrium/quantity - v7.1.0
    Preparing search index...

    Interface QuantityConfigInput<Numeric>

    Settings accepted by the factory and Quantity.withConfig(). Numeric options belong to the selected adapter. All properties are optional; omitted settings inherit from the parent class, without mutating that class.

    import { Quantity } from '@neutrium/quantity';
    const Q = Quantity.withConfig({ cache: { conversionResults: false } });
    const q = new Q('1 m');
    q.to('cm') === q.to('cm'); // false: converted results are not retained
    interface QuantityConfigInput<Numeric = never> {
        cache?: boolean | QuantityCacheInput;
        numeric?: Numeric;
    }

    Type Parameters

    • Numeric = never
    Index
    cache?: boolean | QuantityCacheInput

    Quantity cache policy; false disables all optional caches, true restores their defaults.

    numeric?: Numeric

    Numeric settings interpreted by the selected adapter.