DefinitelyTyped/types/start-server-webpack-plugin/index.d.ts
Anthony Genson bb3bc696c1
Add types for start-server-webpack-plugin (#43689)
* Added declarations for start-server-webpack-plugin

* Applied standard linting

* Update start-server-webpack-plugin - accept string litterals for 'signal' option

Co-Authored-By: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com>

* Update start-server-webpack-plugin - create parameterless constructor suppport

Co-Authored-By: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com>

* Update start-server-webpack-plugin - remove redundant typing of 'apply' method

Co-Authored-By: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com>

* Update start-server-webpack-plugin - remove typescript version as not needed

Co-Authored-By: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com>

* Update start-server-webpack-plugin - combined constructors

Co-authored-by: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com>
2020-04-08 09:56:05 -07:00

43 lines
1.2 KiB
TypeScript

// Type definitions for start-server-webpack-plugin 2.2
// Project: https://github.com/ericclemmons/start-server-webpack-plugin
// Definitions by: AGenson <https://github.com/AGenson>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Plugin, Compiler } from 'webpack';
export = StartServerWebpackPlugin;
declare class StartServerWebpackPlugin extends Plugin {
constructor(options?: string | StartServerWebpackPlugin.Options);
}
declare namespace StartServerWebpackPlugin {
interface Options {
/**
* Name of the server to start (built asset from webpack).
* If not provided, the plugin will tell you the available names.
*/
name?: string;
/**
* Arguments for node.
* Default: `[]`.
*/
nodeArgs?: string[];
/**
* Arguments for the script.
* Default: `[]`.
*/
args?: string[];
/**
* Signal to send for HMR.
* Default: 'false'.
*/
signal?: false | true | 'SIGUSR2';
/**
* Allow typing 'rs' to restart the server.
* Default: 'true' if in 'development' mode, 'false' otherwise.
*/
keyboard?: boolean;
}
}