UNPKG

3.16 kBTypeScriptView Raw
1declare module "punycode" {
2 /**
3 * @deprecated since v7.0.0
4 * The version of the punycode module bundled in Node.js is being deprecated.
5 * In a future major version of Node.js this module will be removed.
6 * Users currently depending on the punycode module should switch to using
7 * the userland-provided Punycode.js module instead.
8 */
9 function decode(string: string): string;
10 /**
11 * @deprecated since v7.0.0
12 * The version of the punycode module bundled in Node.js is being deprecated.
13 * In a future major version of Node.js this module will be removed.
14 * Users currently depending on the punycode module should switch to using
15 * the userland-provided Punycode.js module instead.
16 */
17 function encode(string: string): string;
18 /**
19 * @deprecated since v7.0.0
20 * The version of the punycode module bundled in Node.js is being deprecated.
21 * In a future major version of Node.js this module will be removed.
22 * Users currently depending on the punycode module should switch to using
23 * the userland-provided Punycode.js module instead.
24 */
25 function toUnicode(domain: string): string;
26 /**
27 * @deprecated since v7.0.0
28 * The version of the punycode module bundled in Node.js is being deprecated.
29 * In a future major version of Node.js this module will be removed.
30 * Users currently depending on the punycode module should switch to using
31 * the userland-provided Punycode.js module instead.
32 */
33 function toASCII(domain: string): string;
34 /**
35 * @deprecated since v7.0.0
36 * The version of the punycode module bundled in Node.js is being deprecated.
37 * In a future major version of Node.js this module will be removed.
38 * Users currently depending on the punycode module should switch to using
39 * the userland-provided Punycode.js module instead.
40 */
41 const ucs2: ucs2;
42 interface ucs2 {
43 /**
44 * @deprecated since v7.0.0
45 * The version of the punycode module bundled in Node.js is being deprecated.
46 * In a future major version of Node.js this module will be removed.
47 * Users currently depending on the punycode module should switch to using
48 * the userland-provided Punycode.js module instead.
49 */
50 decode(string: string): number[];
51 /**
52 * @deprecated since v7.0.0
53 * The version of the punycode module bundled in Node.js is being deprecated.
54 * In a future major version of Node.js this module will be removed.
55 * Users currently depending on the punycode module should switch to using
56 * the userland-provided Punycode.js module instead.
57 */
58 encode(codePoints: ReadonlyArray<number>): string;
59 }
60 /**
61 * @deprecated since v7.0.0
62 * The version of the punycode module bundled in Node.js is being deprecated.
63 * In a future major version of Node.js this module will be removed.
64 * Users currently depending on the punycode module should switch to using
65 * the userland-provided Punycode.js module instead.
66 */
67 const version: string;
68}