UNPKG

scrypt-ts-transpiler

Version:

```bash npm i npx scryptlib download npm t ```

25 lines (24 loc) 1.03 kB
import ts, { SortedReadonlyArray } from "typescript"; export declare const enum Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 } export type Comparer<T> = (a: T, b: T) => Comparison; export declare function indicesOf(array: readonly unknown[]): number[]; /** * Stable sort of an array. Elements equal to each other maintain their relative position in the array. * * @internal */ export declare function stableSort<T>(array: readonly T[], comparer: Comparer<T>): SortedReadonlyArray<T>; /** * Compare two numeric values for their order relative to each other. * To compare strings, use any of the `compareStrings` functions. * * @internal */ export declare function compareValues(a: number | undefined, b: number | undefined): Comparison; export declare function formatEnum(value: number, enumObject: any, isFlags?: boolean): string; export declare function formatTypeFlags(flags: ts.TypeFlags | undefined): string; export declare function formatObjectFlags(flags: ts.ObjectFlags | undefined): string;