taglib-ts
    Preparing search index...

    A discriminated-union value that can hold any of the types enumerated by VariantType. Used for complex metadata properties.

    Index

    Methods

    • Returns true when the variant holds no value (Void).

      Returns boolean

    • Returns the stored value as a double-precision float. Numeric types are coerced; all other types return 0.

      Returns number

    • Returns the stored value as a JavaScript number. Numeric types are coerced; all other types return 0.

      Returns number

    • Returns the stored value as a bigint. Integer bigint types are returned directly; JS number types are promoted via BigInt(); all other types return 0n.

      Returns bigint

    • Returns the stored value as a string. Scalar types are stringified; non-scalar types return "".

      Returns string

    • Returns the stored value as a string array. A single String value is wrapped in a one-element array. All other types return [].

      Returns string[]

    • Stores v truncated to a 32-bit signed integer.

      Parameters

      • v: number

        Number to store as a signed 32-bit integer.

      Returns Variant