js-codepage/misc/flow.js

30 lines
575 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 = {
2018-04-21 14:21:59 +00:00
[key:CPIndex]:CPEntry;
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;
magic:any;
cache:any;
};
2018-04-21 14:21:59 +00:00
version:string
};
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
}
*/