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 = {
|
2018-04-21 14:21:59 +00:00
|
|
|
[key:CPIndex]:CPEntry;
|
2016-09-22 17:42:47 +00:00
|
|
|
utils:{
|
2018-04-21 14:21:59 +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;
|
|
|
|
};
|
2018-04-21 14:21:59 +00:00
|
|
|
version:string
|
2016-09-22 17:42:47 +00:00
|
|
|
};
|
|
|
|
|
2018-04-21 14:21:59 +00:00
|
|
|
declare var cptable:CPTable;
|
2017-07-28 06:14:33 +00:00
|
|
|
|
|
|
|
declare module './cptable' {
|
2018-04-21 14:21:59 +00:00
|
|
|
declare module.exports:CPTable;
|
2017-07-28 06:14:33 +00:00
|
|
|
}
|
2016-09-22 17:42:47 +00:00
|
|
|
*/
|