These types are not exported by webpack, but they are available to TypeScript consumers.
These properties are added by the HotModuleReplacementPlugin
<boolean>Custom values available in the loader context.
[index: {string}]<any>
this{NormalModuleLoaderContext|LoaderRunnerLoaderContext |LoaderPluginLoaderContext|HotModuleReplacementPluginLoaderContext|ContextAdditions} content<string>sourceMap<string>additionalData{AdditionalData}- Returns: {string|void|Buffer
|Promise<string|Buffer >}
default{RawLoaderDefinitionFunction<OptionsType, ContextAdditions>|LoaderDefinitionFunction<OptionsType, ContextAdditions>}pitch{PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>}raw{false}
[index: {string}]<any>
These properties are added by the LoaderPlugin
importModule(request, options, callback): void<string><ImportModuleOptions>loadModule(request, callback): voidResolves the given request to a module, applies all configured loaders and calls back with the generated source, the sourceMap and the module instance (usually an instance of NormalModule). Use this function if you need to know the source code of another module to generate the result.
The properties are added by https://github.com/webpack/loader-runner
<object><string><string><any><number><object[]><string><string><string><string><string><string><string><string><string>addContextDependency(context): void<string>Add a directory as dependency of the loader result.
addDependency(file): void<string>Adds a file as dependency of the loader result in order to make them watchable. For example, html-loader uses this technique as it finds src and src-set attributes. Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
addMissingDependency(context): void<string>async(): object<object>Make this loader async.
cacheable(flag?): void<boolean>Make this loader result cacheable. By default it's cacheable. A cacheable loader must have a deterministic result, when inputs and dependencies haven't changed. This means the loader shouldn't have other dependencies than specified with this.addDependency. Most loaders are deterministic and cacheable.
clearDependencies(): voidRemove all dependencies of the loader result. Even initial dependencies and these of other loaders.
dependency(file): void<string>alias of addDependency Adds a file as dependency of the loader result in order to make them watchable. For example, html-loader uses this technique as it finds src and src-set attributes. Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
getContextDependencies(): string[]<string[]>getDependencies(): string[]<string[]>getMissingDependencies(): string[]<string[]>These properties are added by the NormalModule
<Compilation><Compiler><NormalModule><string><number><string><string><boolean><object><number><boolean>addBuildDependency(dep): void<string>emitError(error): void<Error>emitFile(name, content, sourceMap?, assetInfo?): voidemitWarning(warning): void<Error>getLogger(name?): WebpackLogger<string>getOptions(): voidschema{Schema}- Returns: {OptionsType}
getResolve(options?): object<object>resolve(context, request, callback): voidthis{NormalModuleLoaderContext|LoaderRunnerLoaderContext |LoaderPluginLoaderContext|HotModuleReplacementPluginLoaderContext|ContextAdditions} remainingRequest<string>previousRequest<string>data<object>- Returns: {string|void|Buffer
|Promise<string|Buffer >}
this{NormalModuleLoaderContext|LoaderRunnerLoaderContext |LoaderPluginLoaderContext|HotModuleReplacementPluginLoaderContext|ContextAdditions} content{Buffer}sourceMap<string>additionalData{AdditionalData}- Returns: {string|void|Buffer
|Promise<string|Buffer >}
pitch{PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>}raw{false}
pitch{PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>}raw{true}