import { EntityMap } from "../types"; import { SelectionQueryable } from "./SelectionQueryable"; import { ShapedQueryable } from "./ShapedQueryable"; import { QueryOrdering } from "./types"; export class OrderedQueryable extends SelectionQueryable { sort(selector: EntityMap) { this.sorting.push({ selector, direction: QueryOrdering.Ascending }); return new OrderedQueryable(this); } sortDescending(selector: EntityMap) { this.sorting.push({ selector, direction: QueryOrdering.Descending }); return new OrderedQueryable(this); } map>(expression: EntityMap) { this.mapValue = expression; return new ShapedQueryable(this as any); } }