JSPM

@types/localtunnel

2.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 48309
  • Score
    100M100P100Q143203F
  • License MIT

TypeScript definitions for localtunnel

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/localtunnel) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    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

    /// <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

    Credits

    These definitions were written by Vladyslav Khrapov, and Noam Alffasy.