1
0
Files
sashinexists/node_modules/@weborigami/origami/index.ts
2024-12-07 13:18:31 +11:00

23 lines
783 B
TypeScript

/**
* Tree Origami is a JavaScript project, but we use TypeScript as an internal
* tool to confirm our code is type safe.
*/
import { Treelike, Unpackable } from "@weborigami/async-tree";
/**
* A class constructor is an object with a `new` method that returns an
* instance of the indicated type.
*/
export type Constructor<T> = new (...args: any[]) => T;
export type Invocable = Function | Unpackable<Function|Treelike> | Treelike;
export interface JsonObject {
[key: string]: JsonValue;
}
export type JsonValue = boolean | number | string | Date | JsonObject | JsonValue[] | null;
export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;