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