@dxos/echo
    Preparing search index...

    Variable annotationConst

    annotation: {
        <T extends AnnotationScalar>(
            annotation: Annotation.Annotation<T>,
            direction?: "asc" | "desc",
        ): Order.Order<any>;
        <
            T,
            const P extends
            
                    | readonly [keyof T<T> & string]
                    | readonly [
                        keyof T<T> & string,
                        NonNullable<T<T>[keyof T<T> & string]> extends readonly unknown[]
                            ? never
                            : NonNullable<T<T>[keyof T<T> & string]> extends object
                                ? {
                                    [K in string]-?: NonNullable<NonNullable<(...)>[K]> extends AnnotationScalar
                                        ? readonly [K]
                                        : readonly [
                                            K,
                                            NonNullable<(...)> extends readonly (...)[]
                                                ? never
                                                : (...) extends (...) ? (...) : (...),
                                        ]
                                }[keyof NonNullable<T<(...)>[(...) & (...)]> & string]
                                : never,
                    ],
        >(
            annotation: Annotation.Annotation<T>,
            direction: "asc" | "desc",
            path: P,
        ): Order.Order<any>;
    } = ...

    Order by an annotation set on the entity with Annotation.set (meta.annotations[key]). A struct-valued annotation orders by the scalar at path (e.g. ['meters']). Entities without the annotation, or whose value is not a scalar, sort last in either direction.

    Type declaration

      • <T extends AnnotationScalar>(
            annotation: Annotation.Annotation<T>,
            direction?: "asc" | "desc",
        ): Order.Order<any>
      • Type Parameters

        Parameters

        Returns Order.Order<any>

      • <
            T,
            const P extends
            
                    | readonly [keyof T<T> & string]
                    | readonly [
                        keyof T<T> & string,
                        NonNullable<T<T>[keyof T<T> & string]> extends readonly unknown[]
                            ? never
                            : NonNullable<T<T>[keyof T<T> & string]> extends object
                                ? {
                                    [K in string]-?: NonNullable<NonNullable<(...)>[K]> extends AnnotationScalar
                                        ? readonly [K]
                                        : readonly [
                                            K,
                                            NonNullable<(...)> extends readonly (...)[]
                                                ? never
                                                : (...) extends (...) ? (...) : (...),
                                        ]
                                }[keyof NonNullable<T<(...)>[(...) & (...)]> & string]
                                : never,
                    ],
        >(
            annotation: Annotation.Annotation<T>,
            direction: "asc" | "desc",
            path: P,
        ): Order.Order<any>
      • Type Parameters

        • T
        • const P extends
              | readonly [keyof T<T> & string]
              | readonly [
                  keyof T<T> & string,
                  NonNullable<T<T>[keyof T<T> & string]> extends readonly unknown[]
                      ? never
                      : NonNullable<T<T>[keyof T<T> & string]> extends object
                          ? {
                              [K in string]-?: NonNullable<NonNullable<(...)>[K]> extends AnnotationScalar
                                  ? readonly [K]
                                  : readonly [
                                      K,
                                      NonNullable<(...)> extends readonly (...)[]
                                          ? never
                                          : (...) extends (...) ? (...) : (...),
                                  ]
                          }[keyof NonNullable<T<(...)>[(...) & (...)]> & string]
                          : never,
              ]

        Parameters

        Returns Order.Order<any>

    O(1); builds an order AST node without sorting anything.