Sets TS version of the dependency and fixes lint issues

This commit is contained in:
Vajkay René 2018-03-18 17:16:16 +01:00
parent 50646028ca
commit 2aa5b9547d
2 changed files with 25 additions and 24 deletions

View File

@ -2,6 +2,7 @@
// Project: https://github.com/webpack-contrib/uglifyjs-webpack-plugin
// Definitions by: Rene Vajkay <https://github.com/vajkayrene>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { Plugin } from 'webpack';
@ -12,31 +13,31 @@ declare class UglifyJsPlugin extends Plugin {
}
declare namespace UglifyJsPlugin {
export interface UglifyJsPluginOptions {
test?: RegExp | RegExp[],
include?: RegExp | RegExp[],
exclude?: RegExp | RegExp[],
cache?: boolean | string,
parallel?: boolean | number,
sourceMap?: boolean,
uglifyOptions?: UglifyJsOptions,
extractComments?: boolean | RegExp | ((node: object, comment: string) => boolean) | ExtractCommentsOptions,
warningsFilter?: (source: string) => boolean
interface UglifyJsPluginOptions {
test?: RegExp | RegExp[];
include?: RegExp | RegExp[];
exclude?: RegExp | RegExp[];
cache?: boolean | string;
parallel?: boolean | number;
sourceMap?: boolean;
uglifyOptions?: UglifyJsOptions;
extractComments?: boolean | RegExp | ((node: object, comment: string) => boolean) | ExtractCommentsOptions;
warningsFilter?: (source: string) => boolean;
}
export interface UglifyJsOptions {
ie8?: boolean,
ecma?: number,
parse?: object,
mangle?: boolean | object,
output?: object,
compress?: boolean | object,
warnings?: boolean
interface UglifyJsOptions {
ie8?: boolean;
ecma?: number;
parse?: object;
mangle?: boolean | object;
output?: object;
compress?: boolean | object;
warnings?: boolean;
}
export interface ExtractCommentsOptions {
condition?: RegExp | ((node: object, comment: string) => boolean),
filename?: string | ((originalFileName: string) => string),
banner?: boolean | string | ((fileName: string) => string)
interface ExtractCommentsOptions {
condition?: RegExp | ((node: object, comment: string) => boolean);
filename?: string | ((originalFileName: string) => string);
banner?: boolean | string | ((fileName: string) => string);
}
}
}

View File

@ -15,4 +15,4 @@ const compilerOptions = webpack({
sourceMap: true,
}),
],
});
});