Skip to content

Commit c9a7324

Browse files
committed
fix: Fix typing
1 parent 2543aa4 commit c9a7324

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/plugin.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import ts from "typescript";
77
import * as docGen from "react-docgen-typescript";
88
import { matcher } from "micromatch";
99

10+
// eslint-disable-next-line
11+
// @ts-ignore: What's the right way to refer to this one?
12+
import JavascriptParser from "webpack/lib/javascript/JavascriptParser.js";
13+
1014
import { LoaderOptions } from "./types";
1115
import DocGenDependency from "./dependency";
1216
import {
@@ -94,9 +98,7 @@ export default class DocgenPlugin implements WebpackPluginInstance {
9498
new DocGenDependency.Template()
9599
);
96100

97-
// eslint-disable-next-line
98-
// @ts-ignore: TODO: What's the type of a parser?
99-
const handler = (parser) => {
101+
const handler = (parser: JavascriptParser) => {
100102
parser.hooks.program.tap(pluginName, () => {
101103
// eslint-disable-next-line
102104
// @ts-ignore

0 commit comments

Comments
 (0)