chore: Make NodeRequire declaration match the latest webpack-env one. (#6962)

This commit is contained in:
Manuel Saelices
2019-02-26 10:09:38 +01:00
committed by Alexander Vakrilov
parent 23147aecf3
commit bb5cec3ed3

View File

@ -22,12 +22,15 @@ declare var console: Console;
declare var require: NodeRequire;
// Extend NodeRequire with the webpack's require context extension.
interface RequireContext {
keys(): string[];
(id: string): any;
<T>(id: string): T;
resolve(id: string): string;
}
interface NodeRequire {
context(root: string, recursive: boolean, filter: RegExp): {
(module: string): any;
id: number;
keys(): string[];
}
context(path: string, deep?: boolean, filter?: RegExp): RequireContext;
}
declare var __dirname: string;