Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Ordering

import type { Ordering } from "https://raw.githubusercontent.com/baetheus/fun/main/sortable.ts";

The ordering type is the expected output of any Compare function. The canonical example is the output of the Array.sort function. For any two values first and second, Ordering means the following:

  • -1 : first < second
  • 0 : first = second
  • 1 : first > second
type Ordering = -1 | 0 | 1;

§Type

§
-1 | 0 | 1
[src]