File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import path from "path" ;
44import createDebug from "debug" ;
5- import * as webpack from "webpack" ;
5+ import { Compiler , WebpackPluginInstance } from "webpack" ;
66import ts from "typescript" ;
77import * as docGen from "react-docgen-typescript" ;
88import { 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 ;
You can’t perform that action at this time.
0 commit comments