diff --git a/types/case-sensitive-paths-webpack-plugin/index.d.ts b/types/case-sensitive-paths-webpack-plugin/index.d.ts index 360d3d6d08..38fdd9c032 100644 --- a/types/case-sensitive-paths-webpack-plugin/index.d.ts +++ b/types/case-sensitive-paths-webpack-plugin/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Urthen/case-sensitive-paths-webpack-plugin#readme // Definitions by: Andrew Makarov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import { Plugin } from 'webpack'; diff --git a/types/clean-webpack-plugin/index.d.ts b/types/clean-webpack-plugin/index.d.ts index 7fc45cc3e4..afe8a65b69 100644 --- a/types/clean-webpack-plugin/index.d.ts +++ b/types/clean-webpack-plugin/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/johnagan/clean-webpack-plugin // Definitions by: Jed Fox // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import { Plugin } from 'webpack'; diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index 8fddd72daf..bfb769ed2f 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/webpack-contrib/compression-webpack-plugin // Definitions by: Anton Kandybo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import { Plugin } from 'webpack'; diff --git a/types/copy-webpack-plugin/index.d.ts b/types/copy-webpack-plugin/index.d.ts index 8bfae1e0ed..1190adcf91 100644 --- a/types/copy-webpack-plugin/index.d.ts +++ b/types/copy-webpack-plugin/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/kevlened/copy-webpack-plugin // Definitions by: flying-sheep // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import { Plugin } from 'webpack' import { IOptions } from 'minimatch' @@ -30,7 +31,7 @@ interface CopyPattern { context?: string /** * Removes all directory references and only copies file names. - * + * * If files have the same name, the result is non-deterministic. (default: `false`) */ flatten?: boolean diff --git a/types/duplicate-package-checker-webpack-plugin/index.d.ts b/types/duplicate-package-checker-webpack-plugin/index.d.ts index 88d8ccd54c..fd2906aa46 100644 --- a/types/duplicate-package-checker-webpack-plugin/index.d.ts +++ b/types/duplicate-package-checker-webpack-plugin/index.d.ts @@ -2,12 +2,13 @@ // Project: https://github.com/darrenscerri/duplicate-package-checker-webpack-plugin#readme // Definitions by: Matt Traynham // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 -import webpack = require('webpack'); +import { Plugin } from 'webpack'; export = DuplicatePackageCheckerWebpackPlugin; -declare class DuplicatePackageCheckerWebpackPlugin extends webpack.Plugin { +declare class DuplicatePackageCheckerWebpackPlugin extends Plugin { constructor(options?: DuplicatePackageCheckerWebpackPlugin.Options); } diff --git a/types/extract-text-webpack-plugin/index.d.ts b/types/extract-text-webpack-plugin/index.d.ts index 962698568a..85d41b4619 100644 --- a/types/extract-text-webpack-plugin/index.d.ts +++ b/types/extract-text-webpack-plugin/index.d.ts @@ -2,8 +2,9 @@ // Project: https://github.com/webpack-contrib/extract-text-webpack-plugin // Definitions by: flying-sheep , kayo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 -import webpack = require('webpack'); +import { Plugin, NewLoader, OldLoader} from 'webpack'; export = ExtractTextPlugin; @@ -11,13 +12,13 @@ export = ExtractTextPlugin; * extract-text-webpack-plugin has no support for .options instead of .query yet. * See https://github.com/webpack/extract-text-webpack-plugin/issues/281 */ -type Loader = string | webpack.OldLoader | webpack.NewLoader; +type Loader = string | OldLoader | NewLoader; /** * Use an `ExtractTextPlugin` instance and a loader returned by `extract` in concert to write files to disk instead of loading them into others. * Usage example at https://github.com/webpack/extract-text-webpack-plugin#usage-example-with-css */ -declare class ExtractTextPlugin extends webpack.Plugin { +declare class ExtractTextPlugin extends Plugin { /** Create a plugin instance defining the extraction target file(s) for the files loaded by `extract` */ constructor(options: string | ExtractTextPlugin.PluginOptions); /** diff --git a/types/html-webpack-plugin/index.d.ts b/types/html-webpack-plugin/index.d.ts index dc23e020d7..35774c1ac6 100644 --- a/types/html-webpack-plugin/index.d.ts +++ b/types/html-webpack-plugin/index.d.ts @@ -4,6 +4,7 @@ // Benjamin Lim // Tomek Łaziuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import { Plugin } from 'webpack'; import { Options as HtmlMinifierOptions } from 'html-minifier'; diff --git a/types/lodash-webpack-plugin/index.d.ts b/types/lodash-webpack-plugin/index.d.ts index 7b2c3ebe67..e7e2dfd4db 100644 --- a/types/lodash-webpack-plugin/index.d.ts +++ b/types/lodash-webpack-plugin/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/lodash/lodash-webpack-plugin#readme // Definitions by: Benjamin Lim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import { Plugin } from 'webpack'; diff --git a/types/optimize-css-assets-webpack-plugin/index.d.ts b/types/optimize-css-assets-webpack-plugin/index.d.ts index b16d384d72..788b2e6a1f 100644 --- a/types/optimize-css-assets-webpack-plugin/index.d.ts +++ b/types/optimize-css-assets-webpack-plugin/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/NMFR/optimize-css-assets-webpack-plugin // Definitions by: Armando Meziat // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import { Plugin } from 'webpack'; diff --git a/types/webpack-bundle-analyzer/index.d.ts b/types/webpack-bundle-analyzer/index.d.ts index c563a9e3cf..3f856a7328 100644 --- a/types/webpack-bundle-analyzer/index.d.ts +++ b/types/webpack-bundle-analyzer/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/th0r/webpack-bundle-analyzer // Definitions by: Michael Strobel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import * as webpack from 'webpack'; diff --git a/types/webpack-chain/index.d.ts b/types/webpack-chain/index.d.ts index 6f6c46daa8..05aa4e5845 100644 --- a/types/webpack-chain/index.d.ts +++ b/types/webpack-chain/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/mozilla-neutrino/webpack-chain // Definitions by: Eirikur Nilsson , Paul Sachs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import * as webpack from 'webpack'; import * as https from 'https'; diff --git a/types/webpack-chunk-hash/index.d.ts b/types/webpack-chunk-hash/index.d.ts index dc8f697a44..f499a00dc9 100644 --- a/types/webpack-chunk-hash/index.d.ts +++ b/types/webpack-chunk-hash/index.d.ts @@ -2,12 +2,13 @@ // Project: https://github.com/alexindigo/webpack-chunk-hash#readme // Definitions by: Matt Traynham // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 -import webpack = require('webpack'); +import { Plugin } from 'webpack'; export = WebpackChunkHash; -declare class WebpackChunkHash extends webpack.Plugin { +declare class WebpackChunkHash extends Plugin { constructor(options?: WebpackChunkHash.Options); } diff --git a/types/webpack-cleanup-plugin/index.d.ts b/types/webpack-cleanup-plugin/index.d.ts index f5fa620413..a6efd31af7 100644 --- a/types/webpack-cleanup-plugin/index.d.ts +++ b/types/webpack-cleanup-plugin/index.d.ts @@ -2,12 +2,12 @@ // Project: https://github.com/gpbl/webpack-cleanup-plugin#readme // Definitions by: Luka Maljic // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 -import webpack = require('webpack'); - +import { Plugin } from 'webpack'; export = WebpackCleanupPlugin; -declare class WebpackCleanupPlugin extends webpack.Plugin { +declare class WebpackCleanupPlugin extends Plugin { constructor(options?: WebpackCleanupPlugin.Options); } diff --git a/types/webpack-dotenv-plugin/index.d.ts b/types/webpack-dotenv-plugin/index.d.ts index 4200c3b15e..b8cfb33ef8 100644 --- a/types/webpack-dotenv-plugin/index.d.ts +++ b/types/webpack-dotenv-plugin/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/nwinch/webpack-dotenv-plugin#readme // Definitions by: Michael Strobel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import * as webpack from 'webpack'; diff --git a/types/webpack-merge/index.d.ts b/types/webpack-merge/index.d.ts index 54c94a738e..17b39a4f06 100644 --- a/types/webpack-merge/index.d.ts +++ b/types/webpack-merge/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -import webpack = require('webpack'); +import { Configuration } from 'webpack'; export = webpackMerge; @@ -24,7 +24,7 @@ declare namespace webpackMerge { type MergeStrategy = 'prepend' | 'append' | 'replace'; interface WebpackMerge { - (...configs: webpack.Configuration[]): webpack.Configuration; + (...configs: Configuration[]): Configuration; (customizeOptions: CustomizeOptions): ConfigurationMergeFunction; unique: UniqueFunction; smart: ConfigurationMergeFunction; diff --git a/types/webpack-node-externals/index.d.ts b/types/webpack-node-externals/index.d.ts index 80dc73b27b..c93d3edecf 100644 --- a/types/webpack-node-externals/index.d.ts +++ b/types/webpack-node-externals/index.d.ts @@ -2,12 +2,13 @@ // Project: https://github.com/liady/webpack-node-externals // Definitions by: Matt Traynham // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 -import webpack = require('webpack'); +import { ExternalsFunctionElement } from 'webpack'; export = webpackNodeExternals; -declare function webpackNodeExternals(options?: webpackNodeExternals.Options): webpack.ExternalsFunctionElement; +declare function webpackNodeExternals(options?: webpackNodeExternals.Options): ExternalsFunctionElement; declare namespace webpackNodeExternals { type WhitelistOption = string | RegExp; diff --git a/types/webpack-notifier/index.d.ts b/types/webpack-notifier/index.d.ts index 1b8e92651f..372b4f2b1c 100644 --- a/types/webpack-notifier/index.d.ts +++ b/types/webpack-notifier/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Turbo87/webpack-notifier#readme // Definitions by: Benjamin Lim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import { Plugin } from 'webpack'; diff --git a/types/webpack-stream/index.d.ts b/types/webpack-stream/index.d.ts index 41fbb3592b..19159f402d 100644 --- a/types/webpack-stream/index.d.ts +++ b/types/webpack-stream/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/shama/webpack-stream // Definitions by: Ian Clanton-Thuon , Benjamin Lim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// diff --git a/types/webpack-validator/index.d.ts b/types/webpack-validator/index.d.ts index 4b6b260877..242a71e6f4 100644 --- a/types/webpack-validator/index.d.ts +++ b/types/webpack-validator/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/js-dxtools/webpack-validator // Definitions by: Simon Hartcher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// diff --git a/types/webpack/index.d.ts b/types/webpack/index.d.ts index f8aa375210..e25adc7e7d 100644 --- a/types/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -10,6 +10,7 @@ // Alan Agius // Spencer Elliott // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// @@ -76,7 +77,7 @@ declare namespace webpack { /** Capture timing information for each module. */ profile?: boolean; /** Cache generated modules and chunks to improve performance for multiple incremental builds. */ - cache?: boolean | any; + cache?: boolean | object; /** Enter watch mode, which rebuilds on file change. */ watch?: boolean; watchOptions?: Options.WatchOptions; @@ -1029,7 +1030,7 @@ declare namespace webpack { * If a loader delivers a result in the pitch method the process turns around and skips the remaining loaders, * continuing with the calls to the more left loaders. data can be passed between pitch and normal call. */ - pitch?(remainingRequest: string, precedingRequest: string, data: any): any | undefined; + pitch?(remainingRequest: string, precedingRequest: string, data: any): any; /** * By default, the resource file is treated as utf-8 string and passed as String to the loader. diff --git a/types/webpack/tslint.json b/types/webpack/tslint.json index 590af11d7e..9d2d6ce987 100644 --- a/types/webpack/tslint.json +++ b/types/webpack/tslint.json @@ -2,7 +2,6 @@ "extends": "dtslint/dt.json", "rules": { // TODO - "no-any-union": false, "no-unnecessary-qualifier": false, "no-void-expression": false, "space-within-parens": false