Skip to content

Commit 64edd98

Browse files
committed
feat(types): import types needed for export in index.js
1 parent cf4b97c commit 64edd98

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

lib/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const memoize = require("./util/memoize");
1111
/** @typedef {import("../declarations/WebpackOptions").Entry} Entry */
1212
/** @typedef {import("../declarations/WebpackOptions").EntryNormalized} EntryNormalized */
1313
/** @typedef {import("../declarations/WebpackOptions").EntryObject} EntryObject */
14+
/** @typedef {import("../declarations/WebpackOptions").FileCacheOptions} FileCacheOptions */
1415
/** @typedef {import("../declarations/WebpackOptions").LibraryOptions} LibraryOptions */
1516
/** @typedef {import("../declarations/WebpackOptions").ModuleOptions} ModuleOptions */
1617
/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} ResolveOptions */
@@ -26,11 +27,15 @@ const memoize = require("./util/memoize");
2627
/** @typedef {import("../declarations/WebpackOptions").WebpackPluginInstance} WebpackPluginInstance */
2728
/** @typedef {import("./Compilation").Asset} Asset */
2829
/** @typedef {import("./Compilation").AssetInfo} AssetInfo */
30+
/** @typedef {import("./Compilation").EntryOptions} EntryOptions */
31+
/** @typedef {import("./Compiler").AssetEmittedInfo} AssetEmittedInfo */
2932
/** @typedef {import("./MultiStats")} MultiStats */
3033
/** @typedef {import("./Parser").ParserState} ParserState */
3134
/** @typedef {import("./ResolverFactory").ResolvePluginInstance} ResolvePluginInstance */
3235
/** @typedef {import("./ResolverFactory").Resolver} Resolver */
3336
/** @typedef {import("./Watching")} Watching */
37+
/** @typedef {import("./cli").Argument} Argument */
38+
/** @typedef {import("./cli").Problem} Problem */
3439
/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsAsset} StatsAsset */
3540
/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsChunk} StatsChunk */
3641
/** @typedef {import("./stats/DefaultStatsFactoryPlugin").StatsChunkGroup} StatsChunkGroup */

types.d.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ declare interface CacheGroupsContext {
664664
moduleGraph: ModuleGraph;
665665
chunkGraph: ChunkGraph;
666666
}
667-
type CacheOptionsNormalized = false | MemoryCacheOptions | FileCacheOptions;
667+
type CacheOptionsNormalized = false | FileCacheOptions | MemoryCacheOptions;
668668
declare class CachedSource extends Source {
669669
constructor(source: Source);
670670
constructor(source: Source | (() => Source), cachedData?: any);
@@ -2058,7 +2058,7 @@ declare interface Configuration {
20582058
/**
20592059
* Cache generated modules and chunks to improve performance for multiple incremental builds.
20602060
*/
2061-
cache?: boolean | MemoryCacheOptions | FileCacheOptions;
2061+
cache?: boolean | FileCacheOptions | MemoryCacheOptions;
20622062

20632063
/**
20642064
* The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
@@ -2115,6 +2115,7 @@ declare interface Configuration {
21152115
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
21162116
*/
21172117
externalsType?:
2118+
| "import"
21182119
| "var"
21192120
| "module"
21202121
| "assign"
@@ -2133,7 +2134,6 @@ declare interface Configuration {
21332134
| "jsonp"
21342135
| "system"
21352136
| "promise"
2136-
| "import"
21372137
| "script"
21382138
| "node-commonjs";
21392139

@@ -2472,9 +2472,9 @@ declare interface ContextHash {
24722472
symlinks?: Set<string>;
24732473
}
24742474
type ContextMode =
2475+
| "weak"
24752476
| "sync"
24762477
| "eager"
2477-
| "weak"
24782478
| "async-weak"
24792479
| "lazy"
24802480
| "lazy-once";
@@ -3958,6 +3958,7 @@ declare interface ExternalsPresets {
39583958
webAsync?: boolean;
39593959
}
39603960
type ExternalsType =
3961+
| "import"
39613962
| "var"
39623963
| "module"
39633964
| "assign"
@@ -3976,7 +3977,6 @@ type ExternalsType =
39763977
| "jsonp"
39773978
| "system"
39783979
| "promise"
3979-
| "import"
39803980
| "script"
39813981
| "node-commonjs";
39823982
declare interface FactorizeModuleOptions {
@@ -6832,6 +6832,7 @@ declare interface ModuleFederationPluginOptions {
68326832
* The external type of the remote containers.
68336833
*/
68346834
remoteType?:
6835+
| "import"
68356836
| "var"
68366837
| "module"
68376838
| "assign"
@@ -6850,7 +6851,6 @@ declare interface ModuleFederationPluginOptions {
68506851
| "jsonp"
68516852
| "system"
68526853
| "promise"
6853-
| "import"
68546854
| "script"
68556855
| "node-commonjs";
68566856

@@ -12209,6 +12209,7 @@ declare interface WebpackOptionsNormalized {
1220912209
* Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
1221012210
*/
1221112211
externalsType?:
12212+
| "import"
1221212213
| "var"
1221312214
| "module"
1221412215
| "assign"
@@ -12227,7 +12228,6 @@ declare interface WebpackOptionsNormalized {
1222712228
| "jsonp"
1222812229
| "system"
1222912230
| "promise"
12230-
| "import"
1223112231
| "script"
1223212232
| "node-commonjs";
1223312233

@@ -12865,7 +12865,6 @@ declare namespace exports {
1286512865
compiler: Compiler
1286612866
) => void;
1286712867
export {
12868-
Argument,
1286912868
AutomaticPrefetchPlugin,
1287012869
AsyncDependenciesBlock,
1287112870
BannerPlugin,
@@ -12912,23 +12911,21 @@ declare namespace exports {
1291212911
ProgressPlugin,
1291312912
ProvidePlugin,
1291412913
RuntimeModule,
12915-
EntryOptions,
1291612914
EntryPlugin as SingleEntryPlugin,
1291712915
SourceMapDevToolPlugin,
1291812916
Stats,
1291912917
Template,
1292012918
WatchIgnorePlugin,
1292112919
WebpackError,
12922-
Problem,
1292312920
WebpackOptionsApply,
1292412921
WebpackOptionsDefaulter,
1292512922
ValidationError as WebpackOptionsValidationError,
1292612923
ValidationError,
1292712924
Entry,
1292812925
EntryNormalized,
1292912926
EntryObject,
12930-
LibraryOptions,
1293112927
FileCacheOptions,
12928+
LibraryOptions,
1293212929
ModuleOptions,
1293312930
ResolveOptionsWebpackOptions as ResolveOptions,
1293412931
RuleSetCondition,
@@ -12942,12 +12939,15 @@ declare namespace exports {
1294212939
WebpackPluginInstance,
1294312940
Asset,
1294412941
AssetInfo,
12942+
EntryOptions,
1294512943
AssetEmittedInfo,
1294612944
MultiStats,
1294712945
ParserState,
1294812946
ResolvePluginInstance,
1294912947
Resolver,
1295012948
Watching,
12949+
Argument,
12950+
Problem,
1295112951
StatsAsset,
1295212952
StatsChunk,
1295312953
StatsChunkGroup,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy