mirror of https://github.com/webpack/webpack.git
revert generic approach
This commit is contained in:
parent
40a5eb17fe
commit
8cd30eb222
|
@ -180,6 +180,6 @@ declare class EmptyContextAdditions {
|
|||
_EmptyContextAdditions: true
|
||||
}
|
||||
|
||||
export interface LoaderDefinition<ContextAdditions = EmptyContextAdditions> {
|
||||
(this: LoaderContext & (ContextAdditions extends EmptyContextAdditions ? {} : ContextAdditions), contents: string): string;
|
||||
export interface LoaderDefinition {
|
||||
(this: LoaderContext & EmptyContextAdditions, contents: string): string;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ const memoize = require("./util/memoize");
|
|||
|
||||
/** @typedef {import("../declarations/LoaderContext").EmptyContextAdditions} EmptyContextAdditions */
|
||||
/** @typedef {import("../declarations/LoaderContext").LoaderContext} LoaderContext */
|
||||
/** @template T @typedef {import("../declarations/LoaderContext").LoaderDefinition<T>} LoaderDefinition<T> */
|
||||
/** @typedef {import("../declarations/LoaderContext").LoaderDefinition} LoaderDefinition */
|
||||
/** @typedef {import("../declarations/WebpackOptions").Entry} Entry */
|
||||
/** @typedef {import("../declarations/WebpackOptions").EntryNormalized} EntryNormalized */
|
||||
/** @typedef {import("../declarations/WebpackOptions").EntryObject} EntryObject */
|
||||
|
|
|
@ -5743,12 +5743,6 @@ declare interface Loader {
|
|||
[index: string]: any;
|
||||
}
|
||||
type LoaderContext = NormalModuleLoaderContext & LoaderRunnerLoaderContext;
|
||||
declare interface LoaderDefinition<ContextAdditions> {
|
||||
(
|
||||
this: NormalModuleLoaderContext & LoaderRunnerLoaderContext & {},
|
||||
contents: string
|
||||
): string;
|
||||
}
|
||||
declare interface LoaderItem {
|
||||
loader: string;
|
||||
options: any;
|
||||
|
@ -12008,7 +12002,12 @@ declare namespace exports {
|
|||
export { HttpUriPlugin, HttpsUriPlugin };
|
||||
}
|
||||
}
|
||||
export type LoaderDefinition = LoaderDefinition<T>;
|
||||
export type LoaderDefinition = (
|
||||
this: NormalModuleLoaderContext &
|
||||
LoaderRunnerLoaderContext &
|
||||
EmptyContextAdditions,
|
||||
contents: string
|
||||
) => string;
|
||||
export type WebpackPluginFunction = (
|
||||
this: Compiler,
|
||||
compiler: Compiler
|
||||
|
|
Loading…
Reference in New Issue