[fail-on-errors-webpack-plugin]: New definition (#46130)

This commit is contained in:
inglec-arista 2020-07-18 02:11:32 +01:00 committed by GitHub
parent 8477438b98
commit 8a912db4eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,10 @@
import FailOnErrorsPlugin = require('fail-on-errors-webpack-plugin');
import { Plugin } from 'webpack';
// Test if constructors are assignable to `Webpack.Plugin`
const plugin1: Plugin = new FailOnErrorsPlugin();
const plugin2: Plugin = new FailOnErrorsPlugin({});
const plugin3: Plugin = new FailOnErrorsPlugin({
failOnErrors: true,
failOnWarnings: true,
});

View File

@ -0,0 +1,12 @@
// Type definitions for fail-on-errors-webpack-plugin 3.0
// Project: https://github.com/AustinMatherne/fail-on-errors-webpack-plugin
// Definitions by: Ciarán Ingle <https://github.com/inglec-arista>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Plugin } from 'webpack';
declare class FailOnErrorsWebpackPlugin extends Plugin {
constructor(options?: { failOnErrors?: boolean; failOnWarnings?: boolean });
}
export = FailOnErrorsWebpackPlugin;

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"baseUrl": "../",
"forceConsistentCasingInFileNames": true,
"lib": ["es6"],
"module": "commonjs",
"noEmit": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"typeRoots": ["../"],
"types": []
},
"files": [
"fail-on-errors-webpack-plugin-tests.ts",
"index.d.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }