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.
OptionaldefaultOptions
defaultOptions?:CollatorOptions
The options passed to the collator.
Remarks
These are merged with any per-call options before the collator is invoked.
type
type:string
The scalar type this collator can handle.
Remarks
For built-in types, use a ScalarType.
For rich data, use a string key that represents the subtype of ScalarType.RichData.
A collator for a Scalar of a specific type.
Remarks
Sorting supports sorting across multiple data types. Each collator will have a type.