mirror of https://github.com/webpack/webpack.git
fix: types
This commit is contained in:
parent
82966a31a7
commit
ba552aabfc
|
@ -130,8 +130,8 @@ const ABSOLUTE_PATH_REGEX = /^([a-zA-Z]:\\|\\\\|\/)/;
|
||||||
* @typedef {object} LoaderItem
|
* @typedef {object} LoaderItem
|
||||||
* @property {string} loader
|
* @property {string} loader
|
||||||
* @property {string | null | undefined | Record<string, EXPECTED_ANY>} options
|
* @property {string | null | undefined | Record<string, EXPECTED_ANY>} options
|
||||||
* @property {string=} ident
|
* @property {string | null=} ident
|
||||||
* @property {string=} type
|
* @property {string | null=} type
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1245,10 +1245,7 @@ If changing the source code is not an option there is also a resolve options cal
|
||||||
? parsedResult.query.slice(1)
|
? parsedResult.query.slice(1)
|
||||||
: undefined
|
: undefined
|
||||||
: item.options,
|
: item.options,
|
||||||
ident:
|
ident: item.options === undefined ? undefined : item.ident
|
||||||
item.options === undefined
|
|
||||||
? undefined
|
|
||||||
: /** @type {string} */ (item.ident)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return callback(null, resolved);
|
return callback(null, resolved);
|
||||||
|
|
|
@ -10,7 +10,6 @@ const { SyncHook } = require("tapable");
|
||||||
/** @typedef {import("../../declarations/WebpackOptions").Falsy} Falsy */
|
/** @typedef {import("../../declarations/WebpackOptions").Falsy} Falsy */
|
||||||
/** @typedef {import("../../declarations/WebpackOptions").RuleSetLoaderOptions} RuleSetLoaderOptions */
|
/** @typedef {import("../../declarations/WebpackOptions").RuleSetLoaderOptions} RuleSetLoaderOptions */
|
||||||
/** @typedef {import("../../declarations/WebpackOptions").RuleSetRule} RuleSetRule */
|
/** @typedef {import("../../declarations/WebpackOptions").RuleSetRule} RuleSetRule */
|
||||||
/** @typedef {import("../NormalModule").LoaderItem} LoaderItem */
|
|
||||||
|
|
||||||
/** @typedef {(Falsy | RuleSetRule)[]} RuleSetRules */
|
/** @typedef {(Falsy | RuleSetRule)[]} RuleSetRules */
|
||||||
|
|
||||||
|
|
|
@ -9311,8 +9311,8 @@ declare interface LoaderDefinitionFunction<
|
||||||
declare interface LoaderItem {
|
declare interface LoaderItem {
|
||||||
loader: string;
|
loader: string;
|
||||||
options?: null | string | Record<string, any>;
|
options?: null | string | Record<string, any>;
|
||||||
ident?: string;
|
ident?: null | string;
|
||||||
type?: string;
|
type?: null | string;
|
||||||
}
|
}
|
||||||
declare interface LoaderModule<OptionsType = {}, ContextAdditions = {}> {
|
declare interface LoaderModule<OptionsType = {}, ContextAdditions = {}> {
|
||||||
default?:
|
default?:
|
||||||
|
|
Loading…
Reference in New Issue