From d20a983f78abfcda79fc85c66a5f0736e45ab99f Mon Sep 17 00:00:00 2001 From: Michael Loughry Date: Wed, 4 Jan 2017 22:17:35 -0800 Subject: [PATCH] Allow @types/webpack-env to coexist with @types/node (#13741) * Allow @types/webpack-env to coexist with @types/node - Took suggestion from `rikoe` in issue #11324 * Increment header version --- webpack-env/index.d.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/webpack-env/index.d.ts b/webpack-env/index.d.ts index 4831f298e1..777014c506 100644 --- a/webpack-env/index.d.ts +++ b/webpack-env/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for webpack (module API) 1.12 +// Type definitions for webpack (module API) 1.13 // Project: https://github.com/webpack/webpack // Definitions by: use-strict // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -35,7 +35,7 @@ declare namespace __WebpackModuleApi { * * The module id is a number in webpack (in contrast to node.js where it is a string, the filename). */ - resolve(path: string): number; + resolve(path: string): number | string; /** * Like require.resolve, but doesn’t include the module into the bundle. It’s a weak dependency. */ @@ -180,7 +180,10 @@ declare namespace __WebpackModuleApi { } } -declare var require: __WebpackModuleApi.RequireFunction; +interface NodeRequire extends __WebpackModuleApi.RequireFunction { +} + +declare var require: NodeRequire; /** * The resource query of the current module. @@ -229,4 +232,6 @@ declare var __non_webpack_require__: any; */ declare var DEBUG: boolean; -declare var module: __WebpackModuleApi.Module; +interface NodeModule extends __WebpackModuleApi.Module {} + +declare var module: NodeModule;