🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@types/webpack-hot-client

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/webpack-hot-client

TypeScript definitions for webpack-hot-client

ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
4.1.7
Version published
Weekly downloads
1.1K
27.45%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/webpack-hot-client

Summary

This package contains type definitions for webpack-hot-client (https://github.com/webpack-contrib/webpack-hot-client).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack-hot-client.

index.d.ts

/// <reference types="node" />

import * as net from "net";
import webpack = require("webpack");
import { Server } from "ws";

export = WebpackHotClient;

declare function WebpackHotClient(
    compiler: webpack.Compiler | webpack.MultiCompiler,
    options: WebpackHotClient.Options,
): WebpackHotClient.Client;

declare namespace WebpackHotClient {
    interface WebSocketServer extends Server {
        /** Forwards a message to each open client on the WebSocketServer */
        broadcast(data: any): void;
        /** Processes stats and sends messages through broadcast() */
        send(stats: webpack.Stats): void;
    }

    interface Client {
        /** Function that closes the WebSocketServer opened by the module. */
        close(callback?: () => void): void;
        /** WebSocketServer instance with some hot-client specific method overrides */
        server: WebSocketServer;
        /** Readonly version of the options after applying defaults */
        options: Readonly<Options>;
    }

    interface WebpackHotHost {
        /** Client hostname that is used in the browser by WebSockets */
        client: string;
        /** Server hostname */
        server: string;
    }

    interface Options {
        /** Automatically configure every entry */
        allEntries?: boolean | undefined;
        /** Auto configure the given webpack config with the hot configuration */
        autoConfigure?: boolean | undefined;
        /** Host that the WebSocket listens on */
        host?: WebpackHotHost | string | undefined;
        /** Enable hot module reloading */
        hmr?: boolean | undefined;
        /** Enable HTTPS */
        https?: boolean | undefined;
        /** Level of information for webpack-hot-client to output */
        logLevel?: "trace" | "debug" | "info" | "warn" | "error" | "silent" | undefined;
        /** Prepend timestamp to each log line */
        logTime?: boolean | undefined;
        /** Port that the WebSocket listens on */
        port?: number | undefined;
        /** Reload the page if a patch cannot be applied by webpack */
        reload?: boolean | undefined;
        /** Server instance for webpack-hot-client to connect to */
        server?: net.Server | undefined;
        /** Webpack stats configuration */
        stats?: webpack.Options.Stats | undefined;
        /** Webpack compile target */
        validTargets?: string[] | undefined;
    }
}

Additional Details

Credits

These definitions were written by ZSkycat, and Brian Armstrong.

FAQs

Package last updated on 24 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts