FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore: Make NodeRequire declaration match the latest webpack-env one.… · NativeScript/NativeScript@bb5cec3 · GitHub

Commit bb5cec3

Browse files
authored andcommitted
chore: Make NodeRequire declaration match the latest webpack-env one. (#6962)
1 parent 23147ae commit bb5cec3

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎tns-core-modules/tns-core-modules.d.ts‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ declare var console: Console;
2222
declare var require: NodeRequire;
2323

2424
// Extend NodeRequire with the webpack's require context extension.
25+
interface RequireContext {
26+
keys(): string[];
27+
(id: string): any;
28+
<T>(id: string): T;
29+
resolve(id: string): string;
30+
}
31+
2532
interface NodeRequire {
26-
context(root: string, recursive: boolean, filter: RegExp): {
27-
(module: string): any;
28-
id: number;
29-
keys(): string[];
30-
}
33+
context(path: string, deep?: boolean, filter?: RegExp): RequireContext;
3134
}
3235

3336
declare var __dirname: string;

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL