mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 11:17:04 +08:00
chore: Make NodeRequire declaration match the latest webpack-env one. (#6962)
This commit is contained in:

committed by
Alexander Vakrilov

parent
23147aecf3
commit
bb5cec3ed3
13
tns-core-modules/tns-core-modules.d.ts
vendored
13
tns-core-modules/tns-core-modules.d.ts
vendored
@ -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;
|
||||
|
Reference in New Issue
Block a user