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
|
||||
* @property {string} loader
|
||||
* @property {string | null | undefined | Record<string, EXPECTED_ANY>} options
|
||||
* @property {string=} ident
|
||||
* @property {string=} type
|
||||
* @property {string | null=} ident
|
||||
* @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)
|
||||
: undefined
|
||||
: item.options,
|
||||
ident:
|
||||
item.options === undefined
|
||||
? undefined
|
||||
: /** @type {string} */ (item.ident)
|
||||
ident: item.options === undefined ? undefined : item.ident
|
||||
};
|
||||
|
||||
return callback(null, resolved);
|
||||
|
|
|
@ -10,7 +10,6 @@ const { SyncHook } = require("tapable");
|
|||
/** @typedef {import("../../declarations/WebpackOptions").Falsy} Falsy */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").RuleSetLoaderOptions} RuleSetLoaderOptions */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").RuleSetRule} RuleSetRule */
|
||||
/** @typedef {import("../NormalModule").LoaderItem} LoaderItem */
|
||||
|
||||
/** @typedef {(Falsy | RuleSetRule)[]} RuleSetRules */
|
||||
|
||||
|
|
|
@ -9311,8 +9311,8 @@ declare interface LoaderDefinitionFunction<
|
|||
declare interface LoaderItem {
|
||||
loader: string;
|
||||
options?: null | string | Record<string, any>;
|
||||
ident?: string;
|
||||
type?: string;
|
||||
ident?: null | string;
|
||||
type?: null | string;
|
||||
}
|
||||
declare interface LoaderModule<OptionsType = {}, ContextAdditions = {}> {
|
||||
default?:
|
||||
|
|
Loading…
Reference in New Issue