API Reference > imodeljs-Quantity > Quantity > Format > parsePrecision parsePrecision MethodStatic This method validates the input value, that is typically extracted for persisted JSON data, is a valid DecimalPrecision or FractionalPrecision. Throws exception if not valid. parsePrecision(precision: number, formatName: string, type: FormatType): DecimalPrecision | FractionalPrecision Parameter Type Description precision number formatName string type FormatType Returns - DecimalPrecision | FractionalPrecision Defined in quantity/src/Formatter/Format.ts Line 304 Last Updated: 12 June, 2024