Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/intl/icu_capi/bindings/js/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 2 kB image not shown  

Quellcode-Bibliothek DateTimeAlignment.mjs   Sprache: unbekannt

 
Untersuchungsergebnis.mjs Download desUnknown {[0] [0] [0]}

// generated by diplomat-tool
import wasm from "./diplomat-wasm.mjs";
import * as diplomatRuntime from "./diplomat-runtime.mjs";



/**
 * See the [Rust documentation for `Alignment`](https://docs.rs/icu/2.1.1/icu/datetime/options/enum.Alignment.html) for more information.
 */
export class DateTimeAlignment {
    #value = undefined;

    static #values = new Map([
        ["Auto", 0],
        ["Column", 1]
    ]);

    static getAllEntries() {
        return DateTimeAlignment.#values.entries();
    }

    #internalConstructor(value) {
        if (arguments.length > 1 && arguments[0] === diplomatRuntime.internalConstructor) {
            // We pass in two internalConstructor arguments to create *new*
            // instances of this type, otherwise the enums are treated as singletons.
            if (arguments[1] === diplomatRuntime.internalConstructor ) {
                this.#value = arguments[2];
                return this;
            }
            return DateTimeAlignment.#objectValues[arguments[1]];
        }

        if (value instanceof DateTimeAlignment) {
            return value;
        }

        let intVal = DateTimeAlignment.#values.get(value);

        // Nullish check, checks for null or undefined
        if (intVal != null) {
            return DateTimeAlignment.#objectValues[intVal];
        }

        throw TypeError(value + " is not a DateTimeAlignment and does not correspond to any of its enumerator values.");
    }

    /** @internal */
    static fromValue(value) {
        return new DateTimeAlignment(value);
    }

    get value(){
        return [...DateTimeAlignment.#values.keys()][this.#value];
    }

    /** @internal */
    get ffiValue(){
        return this.#value;
    }
    static #objectValues = [
        new DateTimeAlignment(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 0),
        new DateTimeAlignment(diplomatRuntime.internalConstructor, diplomatRuntime.internalConstructor, 1),
    ];

    static Auto = DateTimeAlignment.#objectValues[0];
    static Column = DateTimeAlignment.#objectValues[1];


    constructor(value) {
        return this.#internalConstructor(...arguments)
    }
}

[0.53Quellennavigators]