source: trip-planner-front/node_modules/internal-ip/index.d.ts@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.3 KB
Line 
1interface v6 {
2 /**
3 * @returns The IPv6 address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `null` will be returned.
4 *
5 * @example
6 *
7 * console.log(await internalIp.v6());
8 * //=> 'fe80::1'
9 */
10 (): Promise<string>;
11
12 /**
13 * @returns The IPv6 address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `null` will be returned.
14 *
15 * @example
16 *
17 * console.log(internalIp.v6.sync());
18 * //=> 'fe80::1'
19 */
20 sync(): string;
21}
22
23interface v4 {
24 /**
25 * @returns The IPv4 address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `null` will be returned.
26 *
27 * @example
28 *
29 * console.log(await internalIp.v4())
30 * //=> '10.0.0.79'
31 */
32 (): Promise<string>;
33
34 /**
35 * @returns The IPv4 address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `null` will be returned.
36 *
37 * @example
38 *
39 * console.log(internalIp.v4.sync())
40 * //=> '10.0.0.79'
41 */
42 sync(): string;
43}
44
45declare const internalIp: {
46 v6: v6;
47 v4: v4;
48
49 // TODO: Remove this for the next major release
50 default: typeof internalIp;
51};
52
53export = internalIp;
Note: See TracBrowser for help on using the repository browser.