From 5e2a11a1e4f6edb02afe6fd8f63bb51a1bf05d02 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Fri, 7 Jul 2017 09:21:33 -0700 Subject: [PATCH] Update index.d.ts --- types/webpack/index.d.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/types/webpack/index.d.ts b/types/webpack/index.d.ts index 43295be8b9..5890c8679c 100644 --- a/types/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -95,6 +95,18 @@ declare namespace webpack { interface Entry { [name: string]: string | string[]; } + + interface DevtoolModuleTemplateInfo { + identifier: string; + shortIdentifier: string; + resource: any; + resourcePath: string; + absoluteResourcePath: string; + allLoaders: any[]; + query: string; + moduleId: string; + hash: string; + } interface Output { /** The output directory as absolute path (required). */ @@ -106,9 +118,9 @@ declare namespace webpack { /** The filename of the SourceMaps for the JavaScript files. They are inside the output.path directory. */ sourceMapFilename?: string; /** Filename template string of function for the sources array in a generated SourceMap. */ - devtoolModuleFilenameTemplate?: string | (info: any) => string; + devtoolModuleFilenameTemplate?: string | ((info: DevtoolModuleTemplateInfo) => string); /** Similar to output.devtoolModuleFilenameTemplate, but used in the case of duplicate module identifiers. */ - devtoolFallbackModuleFilenameTemplate?: string; + devtoolFallbackModuleFilenameTemplate?: string | ((info: DevtoolModuleTemplateInfo) => string); /** * Enable line to line mapped mode for all/specified modules. * Line to line mapped mode uses a simple SourceMap where each line of the generated source is mapped to the same line of the original source.