# @types/localtunnel

> TypeScript definitions for localtunnel

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

## Install

```sh
npm install @types/localtunnel
pnpm add @types/localtunnel
yarn add @types/localtunnel
bun add @types/localtunnel
```

## 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 | 2.0.4 |
| Published | 2023-11-07 |
| First published | 2019-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

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

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 2.0.4 (latest) — 2023-11-07
- 2.0.2 (ts4.3) — 2023-08-30
- 2.0.1 (ts3.6) — 2021-07-08
- 2.0.0 (ts2.8) — 2020-02-25
- 1.9.0 (ts2.0) — 2019-04-11
- 2.0.3 — 2023-10-18

## README

# Installation
> `npm install --save @types/localtunnel`

# Summary
This package contains type definitions for localtunnel (https://github.com/localtunnel/localtunnel).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/localtunnel.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/localtunnel/index.d.ts)
````ts
/// <reference types="node" />

import { EventEmitter } from "events";

export = localtunnel;

declare function localtunnel(
    port: number | localtunnel.TunnelConfig & { port: number },
): Promise<localtunnel.Tunnel>;

declare function localtunnel(
    opts: localtunnel.TunnelConfig & { port: number },
    callback: localtunnel.TunnelCallback,
): localtunnel.Tunnel;

declare function localtunnel(
    port: number,
    opts: localtunnel.TunnelConfig,
): Promise<localtunnel.Tunnel>;

declare function localtunnel(
    port: number,
    opts: localtunnel.TunnelConfig,
    callback: localtunnel.TunnelCallback,
): localtunnel.Tunnel;

declare namespace localtunnel {
    type TunnelCallback = (
        err?: string,
        tunnel?: Tunnel,
    ) => void;

    interface TunnelConfig {
        subdomain?: string | undefined;
        host?: string | undefined;
        local_host?: string | undefined;
        local_https?: boolean | undefined;
        local_cert?: string | undefined;
        local_key?: string | undefined;
        local_ca?: string | undefined;
        allow_invalid_cert?: boolean | undefined;
    }

    interface Tunnel extends EventEmitter {
        url: string;
        tunnelCluster: TunnelCluster;
        open(cb: ((err: string) => void) | (() => void)): void;
        close(): void;
    }

    interface TunnelCluster extends EventEmitter {
        open(): void;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:38 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Vladyslav Khrapov](https://github.com/vladhrapov), and [Noam Alffasy](https://github.com/noamalffasy).

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