js-codepage/misc/flow.js

29 lines
560 B
JavaScript
Raw Normal View History

/*::
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;
type CPTable = {
2017-07-28 06:14:33 +00:00
[key: CPIndex]:CPEntry;
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;
magic:any;
cache:any;
};
};
declare var cptable: CPTable;
2017-07-28 06:14:33 +00:00
declare module './cptable' {
declare var exports: CPTable;
}
*/