2016-09-22 17:42:47 +00:00
|
|
|
/*::
|
2017-07-28 06:14:33 +00:00
|
|
|
type EMap = {[e:string]:number};
|
|
|
|
type DMap = Array<string>;
|
|
|
|
type CPEntry = {enc:EMap, dec:DMap};
|
|
|
|
|
|
|
|
type Data = string | Array<number> | Buffer;
|
|
|
|
type StrData = string | Array<string> | Buffer;
|
|
|
|
type OutType = Data;
|
|
|
|
|
|
|
|
type CPIndex = number|string;
|
|
|
|
|
2016-09-22 17:42:47 +00:00
|
|
|
type CPTable = {
|
2017-07-28 06:14:33 +00:00
|
|
|
[key: CPIndex]:CPEntry;
|
2016-09-22 17:42:47 +00:00
|
|
|
utils:{
|
2018-01-18 22:47:47 +00:00
|
|
|
decode(cp:CPIndex, data:OutType): string;
|
2017-07-28 06:14:33 +00:00
|
|
|
encode(cp:CPIndex, data:StrData, ofmt:?string):OutType;
|
|
|
|
hascp(cp:number):boolean;
|
2016-09-22 17:42:47 +00:00
|
|
|
magic:any;
|
|
|
|
cache:any;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
declare var cptable: CPTable;
|
2017-07-28 06:14:33 +00:00
|
|
|
|
|
|
|
declare module './cptable' {
|
|
|
|
declare var exports: CPTable;
|
|
|
|
}
|
2016-09-22 17:42:47 +00:00
|
|
|
*/
|