From 4727c84a18dddb824ab0049fb12c9518dbd3b4ca Mon Sep 17 00:00:00 2001 From: Manuel Saelices Date: Mon, 25 Feb 2019 13:49:45 +0100 Subject: [PATCH] chore: Make NodeRequire declaration match the latest webpack-env one. --- tns-core-modules/tns-core-modules.d.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tns-core-modules/tns-core-modules.d.ts b/tns-core-modules/tns-core-modules.d.ts index 495b0ee5b..1a9ec6d30 100644 --- a/tns-core-modules/tns-core-modules.d.ts +++ b/tns-core-modules/tns-core-modules.d.ts @@ -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; + (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;