tor-browser

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

UnitsConverter.d.ts (1294B)


      1 // generated by diplomat-tool
      2 import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
      3 
      4 
      5 /**
      6 * An ICU4X Units Converter object, capable of converting between two [`MeasureUnit`]s.
      7 *
      8 * You can create an instance of this object using [`UnitsConverterFactory`] by calling the `converter` method.
      9 *
     10 * See the [Rust documentation for `UnitsConverter`](https://docs.rs/icu/latest/icu/experimental/units/converter/struct.UnitsConverter.html) for more information.
     11 */
     12 
     13 
     14 export class UnitsConverter {
     15    get ffiValue(): pointer;
     16 
     17 
     18    /**
     19     * Converts the input value from the input unit to the output unit (that have been used to create this converter).
     20     * NOTE:
     21     * The conversion using floating-point operations is not as accurate as the conversion using ratios.
     22     *
     23     * See the [Rust documentation for `convert`](https://docs.rs/icu/latest/icu/experimental/units/converter/struct.UnitsConverter.html#method.convert) for more information.
     24     */
     25    convertNumber(value: number): number;
     26 
     27    /**
     28     * Clones the current [`UnitsConverter`] object.
     29     *
     30     * See the [Rust documentation for `clone`](https://docs.rs/icu/latest/icu/experimental/units/converter/struct.UnitsConverter.html#method.clone) for more information.
     31     */
     32    clone(): UnitsConverter;
     33 }