/** * @author fenris */ declare type int = number; /** * @author fenris */ declare type float = number; /** * @author fenris */ declare type type_time = { hours: int; minutes: int; seconds: int; }; /** * @author fenris */ declare type type_pseudopointer = { value: type_value; }; /** * @author fenris */ declare function pseudopointer_null(): type_pseudopointer; /** * @author fenris */ declare function pseudopointer_make(value: type_value): type_pseudopointer; /** * @author fenris */ declare function pseudopointer_isset(pseudopointer: type_pseudopointer): boolean; /** * @author fenris */ declare function pseudopointer_read(pseudopointer: type_pseudopointer): type_value; /** * @author fenris */ declare function pseudopointer_write(pseudopointer: type_pseudopointer, value: type_value): void; declare var process: any; declare var require: any; declare class Buffer { constructor(x: string, modifier?: string); toString(modifier?: string): string; } declare var java: any; declare module lib_base { /** * @author fenris */ function environment(): string; } /** * @author fenris */ declare var instance_verbosity: int; /** * @desc the ability to check for equality with another element of the same domain * @author fenris */ interface interface_collatable { /** * @author fenris */ _collate(value: type_value): boolean; } /** * @author fenris */ declare function instance_collate(value1: type_value, value2: type_value): boolean; /** * @desc the ability to compare with another element of the same domain for determining if the first is "smaller than or equal to" the latter * @author fenris */ interface interface_comparable { /** * @author fenris */ _compare(value: type_value): boolean; } /** * @author fenris */ declare function instance_compare(value1: type_value, value2: type_value): boolean; /** * @desc the ability to create an exact copy * @author fenris */ interface interface_cloneable { /** * @author fenris */ _clone(): type_value; } /** * @author fenris */ declare function instance_clone(value: type_value): type_value; /** * @author fenris */ interface interface_hashable { /** * @author fenris */ _hash(): string; } /** * @desc the ability to generate a string out of the element, which identifies it to a high degree * @author fenris */ declare function instance_hash(value: type_value): string; /** * @author fenris */ interface interface_showable { /** * @author fenris */ _show(): string; } /** * @desc the ability to map the element to a textual representation (most likely not injective) * @author fenris */ declare function instance_show(value: type_value): string; /** * @todo outsource to dedicated plankton-lib */ declare module lib_log { /** * @author fenris */ function log(...args: Array): void; /** * @author fenris */ function info(...args: Array): void; /** * @author fenris */ function warn(...args: Array): void; /** * @author fenris */ function error(...args: Array): void; } /** * @author frac */ interface interface_decorator { /** * @author frac */ core: type_core; } /** * @author frac */ declare class class_observer { /** * @author frac */ protected counter: int; /** * @author frac */ protected actions: { [id: string]: (information: Object) => void; }; /** * @author frac */ protected buffer: Array; /** * @author frac */ constructor(); /** * @author frac */ empty(): boolean; /** * @author frac */ flush(): void; /** * @author frac */ set(id: string, action: (information: Object) => void): void; /** * @author frac */ del(id: string): void; /** * @author frac */ add(action: (information: Object) => void): void; /** * @author frac */ notify(information?: Object, delayed?: boolean): void; /** * @author frac */ rollout(): void; } /** * @author frac */ /** * @author frac */ declare module lib_maybe { /** * @author fenris */ type type_maybe = { kind: string; parameters: Object; }; /** * @author fenris */ function make_nothing(): type_maybe; /** * @author fenris */ function make_just(value: type_value): type_maybe; /** * @author fenris */ function is_nothing(maybe: type_maybe): boolean; /** * @author fenris */ function is_just(maybe: type_maybe): boolean; /** * @author fenris */ function cull(maybe: type_maybe): type_value; /** * @author fenris */ function propagate(maybe: type_maybe, function_: (value: type_value) => type_maybe): type_maybe; } /** * @author fenris */ declare class class_maybe implements interface_showable { /** * @desc whether the wrapper is nothing * @author fenris */ is_nothing(): boolean; /** * @desc whether the wrapper is just * @author fenris */ is_just(): boolean; /** * @desc return the value, stored in the maybe-wrapper * @author fenris */ cull(): type_value; /** * @author fenris */ toString(): string; /** * @author fenris */ distinguish(action_just: (value?: type_value) => void, action_nothing?: (reason?: string) => void): void; /** * @author fenris */ propagate(action: (value: type_value) => class_maybe): class_maybe; /** * @desc [implementation] * @author fenris */ _show(): string; } /** * @author fenris */ declare class class_nothing extends class_maybe { /** * @author fenris */ private reason; /** * @author fenris */ constructor(reason?: string); /** * @author fenris */ is_nothing(): boolean; /** * @author fenris */ is_just(): boolean; /** * @author fenris */ cull(): type_value; /** * @author fenris */ toString(): string; /** * @author fenris */ reason_get(): string; /** * @author fenris */ distinguish(action_just: (value?: type_value) => void, action_nothing?: (reason?: string) => void): void; /** * @author fenris */ propagate(action: (value: type_value) => class_maybe): class_maybe; } /** * @author fenris */ declare class class_just extends class_maybe { /** * @author fenris */ private value; /** * @author fenris */ constructor(value: type_value); /** * @author fenris */ is_nothing(): boolean; /** * @author fenris */ is_just(): boolean; /** * @author fenris */ cull(): type_value; /** * @author fenris */ toString(): string; /** * @author fenris */ distinguish(action_just: (value?: type_value) => void, action_nothing?: (reason?: string) => void): void; /** * @author fenris */ propagate(action: (value: type_value) => class_maybe): class_maybe; } /** * @author frac */ declare class class_error extends Error { /** * @author frac */ protected suberrors: Array; /** * @author frac */ protected mess: string; /** * @author frac */ constructor(message: string, suberrors?: Array); /** * @override * @author frac */ toString(): string; }