punycode.d.ts (594B)
1 declare module 'punycode' { 2 function ucs2decode(string:string):Array<number>; 3 function ucs2encode(array:Array<number>):string; 4 function decode(string:string):string; 5 function encode(string:string):string; 6 function toASCII(string:string):string; 7 function toUnicode(string:string):string; 8 9 interface Punycode { 10 'version': '2.2.0'; 11 'ucs2': { 12 'decode': typeof ucs2decode; 13 'encode': typeof ucs2encode; 14 }, 15 'decode': typeof decode; 16 'encode': typeof encode; 17 'toASCII': typeof toASCII; 18 'toUnicode': typeof toUnicode; 19 } 20 21 const punycode:Punycode; 22 23 export default punycode; 24 }