@types/default-gateway
TypeScript icon, indicating that this package has built-in type declarations

7.2.2 • Public • Published

Installation

npm install --save @types/default-gateway

Summary

This package contains type definitions for default-gateway (https://github.com/silverwind/default-gateway#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/default-gateway.

index.d.ts

export function gateway4async(): Promise<Result<4>>;
export function gateway6async(): Promise<Result<6>>;
export function gateway4sync(): Result<4>;
export function gateway6sync(): Result<6>;

export interface Result<Family extends 4 | 6> {
    /**
     * The IP address of the default gateway.
     */
    gateway: string;

    /**
     * The IP address version of `gateway`.
     */
    version: Family;

    /**
     * Name of the interface.
     * On Windows, this is the network adapter name.
     * This can be `null` if it cannot be determined.
     */
    int: string | null;
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by BendingBender, Michele Della Mea, and Junxiao Shi.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/default-gateway

Weekly Downloads

13,715

Version

7.2.2

License

MIT

Unpacked Size

4.2 kB

Total Files

5

Last publish

Collaborators

  • types