git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
faf7e12
Branches
Tags
develop-client_server
master
typescript
fs-words.git
server
lib
plankton
base
logic-decl.d.ts
[mov] server
Christian Fraß
commited
faf7e12
at 2021-03-08 23:05:42
logic-decl.d.ts
Blame
History
Raw
/** * @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<type_value> = { value: type_value; }; /** * @author fenris */ declare function pseudopointer_null<type_value>(): type_pseudopointer<type_value>; /** * @author fenris */ declare function pseudopointer_make<type_value>(value: type_value): type_pseudopointer<type_value>; /** * @author fenris */ declare function pseudopointer_isset<type_value>(pseudopointer: type_pseudopointer<type_value>): boolean; /** * @author fenris */ declare function pseudopointer_read<type_value>(pseudopointer: type_pseudopointer<type_value>): type_value; /** * @author fenris */ declare function pseudopointer_write<type_value>(pseudopointer: type_pseudopointer<type_value>, 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<type_value> { /** * @author fenris */ _collate(value: type_value): boolean; } /** * @author fenris */ declare function instance_collate<type_value>(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<type_value> { /** * @author fenris */ _compare(value: type_value): boolean; } /** * @author fenris */ declare function instance_compare<type_value>(value1: type_value, value2: type_value): boolean; /** * @desc the ability to create an exact copy * @author fenris */ interface interface_cloneable<type_value> { /** * @author fenris */ _clone(): type_value; } /** * @author fenris */ declare function instance_clone<type_value>(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<type_value>(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<type_value>(value: type_value): string; /** * @todo outsource to dedicated plankton-lib */ declare module lib_log { /** * @author fenris */ function log(...args: Array<any>): void; /** * @author fenris */ function info(...args: Array<any>): void; /** * @author fenris */ function warn(...args: Array<any>): void; /** * @author fenris */ function error(...args: Array<any>): void; } /** * @author frac */ interface interface_decorator<type_core> { /** * @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<Object>; /** * @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<type_value> = { kind: string; parameters: Object; }; /** * @author fenris */ function make_nothing<type_value>(): type_maybe<type_value>; /** * @author fenris */ function make_just<type_value>(value: type_value): type_maybe<type_value>; /** * @author fenris */ function is_nothing<type_value>(maybe: type_maybe<type_value>): boolean; /** * @author fenris */ function is_just<type_value>(maybe: type_maybe<type_value>): boolean; /** * @author fenris */ function cull<type_value>(maybe: type_maybe<type_value>): type_value; /** * @author fenris */ function propagate<type_value, type_value_>(maybe: type_maybe<type_value>, function_: (value: type_value) => type_maybe<type_value_>): type_maybe<type_value_>; } /** * @author fenris */ declare class class_maybe<type_value> 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<type_value_>(action: (value: type_value) => class_maybe<type_value_>): class_maybe<type_value_>; /** * @desc [implementation] * @author fenris */ _show(): string; } /** * @author fenris */ declare class class_nothing<type_value> extends class_maybe<type_value> { /** * @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<type_value_>(action: (value: type_value) => class_maybe<type_value_>): class_maybe<type_value_>; } /** * @author fenris */ declare class class_just<type_value> extends class_maybe<type_value> { /** * @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<type_value_>(action: (value: type_value) => class_maybe<type_value_>): class_maybe<type_value_>; } /** * @author frac */ declare class class_error extends Error { /** * @author frac */ protected suberrors: Array<Error>; /** * @author frac */ protected mess: string; /** * @author frac */ constructor(message: string, suberrors?: Array<Error>); /** * @override * @author frac */ toString(): string; }