From 7887c98c2c3e3dba6b3651b5a4dcce3684ed3f45 Mon Sep 17 00:00:00 2001 From: Kirill Shakirov Date: Wed, 25 May 2022 13:07:44 +0300 Subject: [PATCH] chore: add type def for the plugin --- package.json | 2 +- src/index.d.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 src/index.d.ts diff --git a/package.json b/package.json index 701e816..2f3c1ce 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "url": "https://github.com/sponsors/gregberge" }, "scripts": { - "build": "rm -rf ./dist && rollup -c && cp -r ./src/entries ./dist/entries", + "build": "rm -rf ./dist && rollup -c && cp -r ./src/entries ./dist/entries && cp ./src/index.d.ts ./dist", "format": "prettier --write \"**/*.{js,json,md}\" \"*.{js,json,md}\"", "lint": "eslint .", "prepublishOnly": "npm run build", diff --git a/src/index.d.ts b/src/index.d.ts new file mode 100644 index 0000000..4103ccb --- /dev/null +++ b/src/index.d.ts @@ -0,0 +1,13 @@ +export = ErrorOverlayPlugin; + +type Compiler = import("webpack").Compiler; + +declare class ErrorOverlayPlugin { + apply(compiler: Compiler): void; +} + +declare const pluginName = 'error-overlay-webpack-plugin'; + +declare namespace ErrorOverlayPlugin { + export { pluginName }; +}