UNPKG

@x5e/gink

Version:

an eventually consistent database

14 lines (13 loc) 914 B
/** * This file contains functions that need to construct generic Containers or convert from a * container of runtime determined type to something else. Typescript has problems with * imports if two classes depend on each other so these functions have been pulled out into * something neither Container nor any of its subclasses need directly. */ import { Muid, Value, AsOf, Entry } from "./typedefs"; import { Container } from "./Container"; import { Database } from "./Database"; import { ContainerBuilder } from "./builders"; export declare function construct(address: Muid, database?: Database, containerBuilder?: ContainerBuilder): Promise<Container | null>; export declare function interpret(entry: Entry, database: Database): Promise<Container | Value | undefined>; export declare function toJson(value: Value | Container, indent?: number | boolean, asOf?: AsOf, seen?: Set<string>): Promise<string>;