Skip to content

Commit 7be7d36

Browse files
authored
chore(typings): update WebpackRequire
1 parent b305c9a commit 7be7d36

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/custom-typings.d.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,26 @@ interface WebpackModule {
7777
};
7878
}
7979

80+
interface WebpackRequireEnsureCallback {
81+
(req: WebpackRequire): void
82+
}
83+
8084
interface WebpackRequire {
81-
context(file: string, flag?: boolean, exp?: RegExp): any;
85+
(id: string): any;
86+
(paths: string[], callback: (...modules: any[]) => void): void;
87+
ensure(ids: string[], callback: WebpackRequireEnsureCallback, chunkName?: string): void;
88+
context(directory: string, useSubDirectories?: boolean, regExp?: RegExp): WebpackContext;
8289
}
8390

91+
interface WebpackContext extends WebpackRequire {
92+
keys(): string[];
93+
}
8494

8595
interface ErrorStackTraceLimit {
8696
stackTraceLimit: number;
8797
}
8898

8999

90-
91100
// Extend typings
92101
interface NodeRequire extends WebpackRequire {}
93102
interface ErrorConstructor extends ErrorStackTraceLimit {}

0 commit comments

Comments
 (0)