webpack: remove union types with type any

This commit is contained in:
Alan Agius
2018-02-12 17:52:36 +01:00
parent a593fd2d60
commit 55898119ea
21 changed files with 35 additions and 18 deletions
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/Urthen/case-sensitive-paths-webpack-plugin#readme
// Definitions by: Andrew Makarov <https://github.com/r3nya>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { Plugin } from 'webpack';
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/johnagan/clean-webpack-plugin
// Definitions by: Jed Fox <https://github.com/j-f1>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { Plugin } from 'webpack';
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/webpack-contrib/compression-webpack-plugin
// Definitions by: Anton Kandybo <https://github.com/dublicator>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { Plugin } from 'webpack';
+2 -1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/kevlened/copy-webpack-plugin
// Definitions by: flying-sheep <https://github.com/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
+3 -2
View File
@@ -2,12 +2,13 @@
// Project: https://github.com/darrenscerri/duplicate-package-checker-webpack-plugin#readme
// Definitions by: Matt Traynham <https://github.com/mtraynham>
// 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);
}
+4 -3
View File
@@ -2,8 +2,9 @@
// Project: https://github.com/webpack-contrib/extract-text-webpack-plugin
// Definitions by: flying-sheep <https://github.com/flying-sheep>, kayo <https://github.com/katyo>
// 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);
/**
+1
View File
@@ -4,6 +4,7 @@
// Benjamin Lim <https://github.com/bumbleblym>
// Tomek Łaziuk <https://github.com/tlaziuk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { Plugin } from 'webpack';
import { Options as HtmlMinifierOptions } from 'html-minifier';
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/lodash/lodash-webpack-plugin#readme
// Definitions by: Benjamin Lim <https://github.com/bumbleblym>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { Plugin } from 'webpack';
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/NMFR/optimize-css-assets-webpack-plugin
// Definitions by: Armando Meziat <https://github.com/odnamrataizem>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { Plugin } from 'webpack';
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/th0r/webpack-bundle-analyzer
// Definitions by: Michael Strobel <https://github.com/kryops>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import * as webpack from 'webpack';
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/mozilla-neutrino/webpack-chain
// Definitions by: Eirikur Nilsson <https://github.com/eirikurn>, Paul Sachs <https://github.com/psachs21>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import * as webpack from 'webpack';
import * as https from 'https';
+3 -2
View File
@@ -2,12 +2,13 @@
// Project: https://github.com/alexindigo/webpack-chunk-hash#readme
// Definitions by: Matt Traynham <https://github.com/mtraynham>
// 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);
}
+3 -3
View File
@@ -2,12 +2,12 @@
// Project: https://github.com/gpbl/webpack-cleanup-plugin#readme
// Definitions by: Luka Maljic <https://github.com/malj>
// 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);
}
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/nwinch/webpack-dotenv-plugin#readme
// Definitions by: Michael Strobel <https://github.com/kryops>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import * as webpack from 'webpack';
+2 -2
View File
@@ -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;
+3 -2
View File
@@ -2,12 +2,13 @@
// Project: https://github.com/liady/webpack-node-externals
// Definitions by: Matt Traynham <https://github.com/mtraynham>
// 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;
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/Turbo87/webpack-notifier#readme
// Definitions by: Benjamin Lim <https://github.com/bumbleblym>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import { Plugin } from 'webpack';
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/shama/webpack-stream
// Definitions by: Ian Clanton-Thuon <https://github.com/iclanton>, Benjamin Lim <https://github.com/bumbleblym>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
+1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/js-dxtools/webpack-validator
// Definitions by: Simon Hartcher <https://github.com/deevus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
///<reference types="webpack" />
+3 -2
View File
@@ -10,6 +10,7 @@
// Alan Agius <https://github.com/alan-agius4>
// Spencer Elliott <https://github.com/elliottsj>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
@@ -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.
-1
View File
@@ -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