@neutrium/quantity - v5.0.0
    Preparing search index...

    Function createQuantityClass

    • Bind a Quantity class to a parser factory without importing a built-in parser. The factory is called for each independently constructed quantity. Derived quantities retain the originating instance's parser and configured class. The factory receives resolved parser settings; forward them to a configurable parser constructor. Subclasses with extra constructor arguments must override the protected constructQuantity(input, units, parser) hook to supply their own state when creating operands and results. withConfig() preserves their constructor type.

      Parameters

      Returns QuantityConstructor