Skip to content

Commit 769229e

Browse files
committed
chore: Improve typing
1 parent 4c8165b commit 769229e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/plugin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import path from "path";
44
import createDebug from "debug";
5-
import * as webpack from "webpack";
5+
import { Compiler, WebpackPluginInstance } from "webpack";
66
import ts from "typescript";
77
import * as docGen from "react-docgen-typescript";
88
import { matcher } from "micromatch";
@@ -58,7 +58,7 @@ const matchGlob = (globs?: string[]) => {
5858
};
5959

6060
/** Inject typescript docgen information into modules at the end of a build */
61-
export default class DocgenPlugin {
61+
export default class DocgenPlugin implements WebpackPluginInstance {
6262
private name = "React Docgen Typescript Plugin";
6363
private options: PluginOptions;
6464
private parser: docGen.FileParser;
@@ -96,7 +96,7 @@ export default class DocgenPlugin {
9696
this.parser = docGen.withCompilerOptions(compilerOptions, docgenOptions);
9797
}
9898

99-
apply(compiler: webpack.Compiler): void {
99+
apply(compiler: Compiler): void {
100100
const pluginName = "DocGenPlugin";
101101

102102
const { exclude = [], include = ["**/**.tsx"] } = this.options;

0 commit comments

Comments
 (0)