git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
b10ca45
Branches
Tags
develop-client_server
master
typescript
fs-words.git
lib
plankton
code
logic-decl.d.ts
[add] lib:plankton
Christian Fraß
commited
b10ca45
at 2021-03-08 23:02:57
logic-decl.d.ts
Blame
History
Raw
declare module lib_code { /** * @author fenris */ interface interface_code<type_from, type_to> { /** * @author fenris */ encode(x: type_from): type_to; /** * @author fenris */ decode(x: type_to): type_from; } } declare module lib_code { } declare module lib_code { /** * @author Christian Fraß <frass@greenscale.de> */ function custom_encode<type_from, type_to>(function_: (from: type_from) => type_to, from: type_from): type_to; /** * @author Christian Fraß <frass@greenscale.de> */ function custom_decode<type_from, type_to>(function_: (to: type_to) => type_from, to: type_to): type_from; } declare module lib_code { /** * @author fenris */ class class_code_custom<type_from, type_to> implements interface_code<type_from, type_to> { /** * @author fenris */ private encodefunc; /** * @author fenris */ private decodefunc; /** * @author fenris */ constructor(encodefunc: (from: type_from) => type_to, decodefunc: (to: type_to) => type_from); /** * @implementation * @author fenris */ encode(x: type_from): type_to; /** * @implementation * @author fenris */ decode(x: type_to): type_from; } } declare module lib_code { /** * @author fenris */ function inverse_encode<type_from, type_to>(decode: (to: type_to) => type_from, to: type_to): type_from; /** * @author fenris */ function inverse_decode<type_from, type_to>(encode: (from: type_from) => type_to, from: type_from): type_to; } declare module lib_code { } declare module lib_code { /** * @author fenris */ class class_code_inverse<type_from, type_to> implements interface_code<type_to, type_from> { /** * @author fenris */ protected subject: interface_code<type_from, type_to>; /** * @author fenris */ constructor(subject: interface_code<type_from, type_to>); /** * @implementation * @author fenris */ encode(to: type_to): type_from; /** * @implementation * @author fenris */ decode(from: type_from): type_to; } } declare module lib_code { /** * @author fenris */ function pair_encode<type_from, type_between, type_to>(encode_first: (from: type_from) => type_between, encode_second: (between: type_between) => type_to, from: type_from): type_to; /** * @author fenris */ function pair_decode<type_from, type_between, type_to>(decode_first: (between: type_between) => type_from, decode_second: (to: type_to) => type_between, to: type_to): type_from; } declare module lib_code { } declare module lib_code { /** * @author fenris */ class class_code_pair<type_from, type_between, type_to> implements interface_code<type_from, type_to> { /** * @author fenris */ protected first: interface_code<type_from, type_between>; /** * @author fenris */ protected second: interface_code<type_between, type_to>; /** * @author fenris */ constructor(first: interface_code<type_from, type_between>, second: interface_code<type_between, type_to>); /** * @implementation * @author fenris */ encode(from: type_from): type_to; /** * @implementation * @author fenris */ decode(to: type_to): type_from; } } declare module lib_code { /** * @author fenris */ function chain_encode(encode_links: Array<(from: any) => any>, from: any): any; /** * @author fenris */ function chain_decode(decode_links: Array<(to: any) => any>, to: any): any; } declare module lib_code { /** * @author fenris */ class class_code_chain implements interface_code<any, any> { /** * @author fenris */ protected links: Array<interface_code<any, any>>; /** * @author fenris */ constructor(links: Array<interface_code<any, any>>); /** * @implementation * @author fenris */ encode(from: any): any; /** * @implementation * @author fenris */ decode(to: any): any; } } declare module lib_code { /** * @author Christian Fraß <frass@greenscale.de> */ type type_flatten_from = Array<{ [name: string]: any; }>; /** * @author Christian Fraß <frass@greenscale.de> */ type type_flatten_to = { keys: Array<string>; data: Array<Array<any>>; }; /** * @author Christian Fraß <frass@greenscale.de> */ function flatten_encode(from: type_flatten_from, keys?: Array<string>): type_flatten_to; /** * @author Christian Fraß <frass@greenscale.de> */ function flatten_decode(to: type_flatten_to): type_flatten_from; } declare module lib_code { /** * @author fenris */ class class_code_flatten implements interface_code<type_flatten_from, type_flatten_to> { /** * @author fenris */ constructor(); /** * @implementation * @author fenris */ encode(x: type_flatten_from): type_flatten_to; /** * @implementation * @author fenris */ decode(x: type_flatten_to): type_flatten_from; } } declare module lib_code { /** * @author fenris */ function jsdate_encode(date: Date): string; /** * @author fenris */ function jsdate_decode(date_: string): Date; } declare module lib_code { } declare module lib_code { /** * @author fenris */ class class_code_jsdate implements interface_code<Date, string> { /** * @author fenris */ constructor(); /** * @implementation * @author fenris */ encode(x: Date): string; /** * @implementation * @author fenris */ decode(x: string): Date; } } declare module lib_code { /** * @author fenris */ function json_encode(x: any, formatted?: boolean): string; /** * @author fenris */ function json_decode(x: string): any; } declare module lib_code { } declare module lib_code { /** * @author fenris */ class class_code_json implements interface_code<any, string> { /** * @author fenris */ constructor(); /** * @implementation * @author fenris */ encode(x: any): string; /** * @implementation * @author fenris */ decode(x: string): any; } } declare module lib_code { /** * @author Christian Fraß <frass@greenscale.de> */ type type_csv_from = { head: Array<string>; data: Array<Array<string>>; }; /** * @author Christian Fraß <frass@greenscale.de> * @todo escaping */ function csv_encode(from: type_csv_from, { "delimiter": delimiter, "linebreak": linebreak, }?: { delimiter?: string; linebreak?: string; }): string; /** * @author Christian Fraß <frass@greenscale.de> */ function csv_decode(to: string, { "delimiter": delimiter, "linebreak": linebreak, "with_head": with_head, }?: { delimiter?: string; linebreak?: string; with_head?: boolean; }): type_csv_from; } declare module lib_code { /** * @author fenris */ class class_code_csv implements interface_code<type_csv_from, string> { /** * @author fenris */ constructor(); /** * @implementation * @author fenris */ encode(x: type_csv_from): string; /** * @implementation * @author fenris */ decode(x: string): type_csv_from; } } declare module lib_code { /** * @author fenris */ function uri_encode(x: string): string; /** * @author fenris */ function uri_decode(x: string): string; } declare module lib_code { } declare module lib_code { /** * @author fenris */ class class_code_uri implements interface_code<string, string> { /** * @author fenris */ constructor(); /** * @implementation * @author fenris */ encode(x: string): string; /** * @implementation * @author fenris */ decode(x: string): string; } } declare module lib_code { /** * @author fenris */ function base64_encode(x: string): string; /** * @author fenris */ function base64_decode(x: string): string; } declare module lib_code { } declare module lib_code { /** * @author fenris */ class class_code_base64 implements interface_code<string, string> { /** * @author fenris */ constructor(); /** * @implementation * @author fenris */ encode(x: string): string; /** * @implementation * @author fenris */ decode(x: string): string; } }