SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface Collator<T>

    A collator for a Scalar of a specific type.

    Sorting supports sorting across multiple data types. Each collator will have a type.

    interface Collator<T = Scalar> {
        compare: string | CollatorFn<T>;
        defaultOptions?: CollatorOptions;
        type: string;
    }

    Type Parameters

    • T = Scalar
    Index
    compare: string | CollatorFn<T>

    Used for sorting.

    • If a string is provided, it is treated as an identifier:
      • It may refer to a built-in collator.
      • Or to a user-defined collator implemented as a script function.
      • The engine will resolve this id at runtime.
    • If a function is provided, it is used directly as the comparator in the current environment. This is not serialized and may not be available in worker/sandboxed runtimes.
    defaultOptions?: CollatorOptions

    The options passed to the collator.

    These are merged with any per-call options before the collator is invoked.

    type: string

    The scalar type this collator can handle.

    • For built-in types, use a ScalarType.
    • For rich data, use a string key that represents the subtype of ScalarType.RichData.