SheetXL - v1.0.2
    Preparing search index...

    Interface IRichData

    A complex object type. This allows for more complex data types to be stored in a cell.

    interface IRichData {
        get isIRichData(): true;
        getKind(): IRichType;
        getProperty(name: string): Scalar;
        getPropertyMeta?(name: string): IRichMeta | null;
        toArray?(): Scalar[][] | null;
        toJSON?(
            toResourceId?: ToResourceId,
        ): IRichData.JSON | Promise<IRichData.JSON>;
        toPrimitive?(): string | number | boolean | Known | null;
        toString(): string;
    }
    Index
    • get isIRichData(): true

      For runtime type checking.

      Returns true

    • The value's kind: the properties it has and how they show. Every value of a kind returns the same instance.

      Returns IRichType

    • Parameters

      • name: string

        The name of the property to retrieve.

      Returns Scalar

    • How the property name shows on this value: the value's own presentation where it differs from its kind's (a price in another currency), else the kind's (IRichType.Property.meta). null, or the method absent, for none.

      Parameters

      • name: string

      Returns IRichMeta | null

    • The items this value unpacks to where a range or array is accepted (a list); null, or the method absent, for a value that is one value.

      Returns Scalar[][] | null

    • The value as JSON, which its kind makes it again from. A value that holds a resource (a picture's bytes) names it by the id toResourceId answers, and the file saves the resource; without toResourceId it names none.

      Parameters

      Returns IRichData.JSON | Promise<IRichData.JSON>

    • The primitive this value reads as wherever one is consumed: LEN, &, +, comparison, ISTEXT, TYPE(), sort, filter, find. A rich text reads as its text; an error that carries more than its code reads as that error; an image reads as nothing (null, or the method absent), and is #VALUE! wherever a primitive is needed.

      Returns string | number | boolean | Known | null

      The ordinary rules then apply to the primitive (text-to-number coercion, collation, error propagation), so a value adds no coercions of its own.

    • The text shown for this value where nothing renders it: a client with no renderer for the kind, a log, a placeholder. A rich text shows its text; an image a short description.

      Returns string

      Display only. What the value reads as to calculation, sorting and the clipboard is toPrimitive.