Merge pull request #32497 from davecardwell/extra-watch-webpack-plugin

[extra-watch-webpack-plugin] Add initial types
This commit is contained in:
Benjamin Lichtman
2019-01-25 15:29:05 -08:00
committed by GitHub
4 changed files with 49 additions and 0 deletions
@@ -0,0 +1,6 @@
import ExtraWatchWebpackPlugin = require("extra-watch-webpack-plugin");
new ExtraWatchWebpackPlugin();
new ExtraWatchWebpackPlugin({});
new ExtraWatchWebpackPlugin({ files: "string", dirs: "string" });
new ExtraWatchWebpackPlugin({ files: ["array"], dirs: ["array"] });
+26
View File
@@ -0,0 +1,26 @@
// Type definitions for extra-watch-webpack-plugin 1.0
// Project: https://github.com/pigcan/extra-watch-webpack-plugin#readme
// Definitions by: Dave Cardwell <https://github.com/davecardwell>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { Plugin } from "webpack";
export = ExtraWatchWebpackPlugin;
declare class ExtraWatchWebpackPlugin extends Plugin {
constructor(options?: ExtraWatchWebpackPlugin.Options);
}
declare namespace ExtraWatchWebpackPlugin {
interface Options {
/**
* `string` (absolute path or glob pattern) or `array`, default `[]`, attach extra files to webpack's watch system
*/
files?: string | ReadonlyArray<string>;
/**
* `string` or `array`, default `[]`, attach extra dirs to webpack's watch system
*/
dirs?: string | ReadonlyArray<string>;
}
}
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "extra-watch-webpack-plugin-tests.ts"]
}
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }