/** @packageDocumentation * @module Quantity */ import { Format } from "./Formatter/Format"; import { AlternateUnitLabelsProvider, UnitConversionProps, UnitConversionSpec, UnitProps, UnitsProvider } from "./Interfaces"; import { QuantityParseResult } from "./Parser"; /** A ParserSpec holds information needed to parse a string into a quantity synchronously. * @beta */ export declare class ParserSpec { private _outUnit; private _conversions; private _format; protected _azimuthBaseConversion?: UnitConversionProps; protected _revolutionConversion?: UnitConversionProps; /** Constructor * @param outUnit The name of a format specification. * @param format Defines the output format for the quantity value. * @param conversions An array of conversion factors necessary to convert from an input unit to the units specified in the format.. */ constructor(outUnit: UnitProps, format: Format, conversions: UnitConversionSpec[]); /** Returns an array of UnitConversionSpecs for each unit label that may be used in the input string. */ get unitConversions(): UnitConversionSpec[]; get format(): Format; get outUnit(): UnitProps; get azimuthBaseConversion(): UnitConversionProps | undefined; get revolutionConversion(): UnitConversionProps | undefined; /** Build conversion specs for ratio format with 2 composite units (numerator/denominator). */ private static getRatioUnitConversions; /** Static async method to create a ParserSpec given the format and unit of the quantity that will be passed to the Parser. The input unit will * be used to generate conversion information for each unit specified in the Format. This method is async due to the fact that the units provider must make * async calls to lookup unit definitions. * @param format The format specification. * @param unitsProvider The units provider is used to look up unit definitions and provide conversion information for converting between units. * @param outUnit The unit a value will be formatted to. This unit is often referred to as persistence unit. */ static create(format: Format, unitsProvider: UnitsProvider, outUnit: UnitProps, altUnitLabelsProvider?: AlternateUnitLabelsProvider): Promise; /** Do the parsing. Done this way to allow Custom Parser Specs to parse custom formatted strings into their quantities. */ parseToQuantityValue(inString: string): QuantityParseResult; } //# sourceMappingURL=ParserSpec.d.ts.map