# @types/default-gateway

> TypeScript definitions for default-gateway

Latest version **7.2.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/default-gateway
pnpm add @types/default-gateway
yarn add @types/default-gateway
bun add @types/default-gateway
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 7.2.2 |
| Published | 2023-11-07 |
| First published | 2018-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51433 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/default-gateway
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/default-gateway
- npm.io page: https://npm.io/package/@types/default-gateway

## Recent versions

- 7.2.2 (latest) — 2023-11-07
- 3.0.1 (ts2.8) — 2019-12-17
- 3.0.0 (ts2.0) — 2018-12-17
- 7.2.1 — 2023-10-18
- 7.2.0 — 2023-06-15

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/default-gateway/index.d.ts)
````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](https://github.com/BendingBender), [Michele Della Mea](https://github.com/ArcaneDiver), and [Junxiao Shi](https://github.com/yoursunny).

---
_Source: https://npm.io/package/@types/default-gateway · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
