tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

MeasureUnitParser.d.ts (1245B)


      1 // generated by diplomat-tool
      2 import type { DataError } from "./DataError"
      3 import type { DataProvider } from "./DataProvider"
      4 import type { MeasureUnit } from "./MeasureUnit"
      5 import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
      6 
      7 
      8 /**
      9 * An ICU4X Measure Unit Parser object, capable of parsing the CLDR unit identifier (e.g. `meter-per-square-second`) and get the [`MeasureUnit`].
     10 *
     11 * See the [Rust documentation for `MeasureUnitParser`](https://docs.rs/icu/latest/icu/experimental/measure/parser/struct.MeasureUnitParser.html) for more information.
     12 */
     13 
     14 
     15 export class MeasureUnitParser {
     16    get ffiValue(): pointer;
     17 
     18 
     19    /**
     20     * Construct a new [`MeasureUnitParser`] instance using a particular data source.
     21     *
     22     * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/experimental/measure/parser/struct.MeasureUnitParser.html#method.new) for more information.
     23     */
     24    static createWithProvider(provider: DataProvider): MeasureUnitParser;
     25 
     26    /**
     27     * See the [Rust documentation for `parse`](https://docs.rs/icu/latest/icu/experimental/measure/parser/struct.MeasureUnitParser.html#method.parse) for more information.
     28     */
     29    parse(unitId: string): MeasureUnit | null;
     30 
     31    constructor();
     32 }