feat: add type for webpack.Configuration.devServer from webpack-dev-server in types/webpack/index.d.ts and types/webpack/v3/index.d.ts (#29593)

This commit is contained in:
Kyle
2018-10-10 05:49:14 +01:00
committed by John Reilly
parent 2e4a63b9c1
commit 35f3259b13
2 changed files with 9 additions and 2 deletions
+4 -1
View File
@@ -14,6 +14,7 @@
// ZSkycat <https://github.com/ZSkycat>
// John Reilly <https://github.com/johnnyreilly>
// Ryan Waskiewicz <https://github.com/rwaskiewicz>
// Kyle Uehlein <https://github.com/kuehlein>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -24,6 +25,7 @@ import { Tapable, HookMap,
AsyncParallelBailHook, AsyncParallelHook, AsyncSeriesBailHook, AsyncSeriesHook, AsyncSeriesWaterfallHook } from 'tapable';
import * as UglifyJS from 'uglify-js';
import { RawSourceMap } from 'source-map';
import * as WebpackDevServer from 'webpack-dev-server';
export = webpack;
@@ -109,9 +111,10 @@ declare namespace webpack {
performance?: Options.Performance;
/** Limit the number of parallel processed modules. Can be used to fine tune performance or to get more reliable profiling results */
parallelism?: number;
/** Optimization options */
optimization?: Options.Optimization;
/** A set of options picked up by `webpack-dev-server` to change the dev server's default behavior. */
devServer?: WebpackDevServer.Configuration;
}
interface Entry {
+5 -1
View File
@@ -11,14 +11,16 @@
// Jason Cheatham <https://github.com/jason0x43>
// Christophe Hurpeau <https://github.com/christophehurpeau>
// Ryan Waskiewicz <https://github.com/rwaskiewicz>
// Kyle Uehlein <https://github.com/kuehlein>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
// TypeScript Version: 2.3
/// <reference types="node" />
import Tapable = require('tapable');
import * as UglifyJS from 'uglify-js';
import { RawSourceMap } from 'source-map';
import * as WebpackDevServer from 'webpack-dev-server';
export = webpack;
@@ -104,6 +106,8 @@ declare namespace webpack {
performance?: Options.Performance;
/** Limit the number of parallel processed modules. Can be used to fine tune performance or to get more reliable profiling results */
parallelism?: number;
/** A set of options picked up by `webpack-dev-server` to change the dev server's default behavior. */
devServer?: WebpackDevServer.Configuration;
}
interface Entry {