Skip to content

Commit aab1899

Browse files
fix(provide): satisfy types for the origin module's build meta
1 parent 0a62146 commit aab1899

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎lib/async-modules/InferAsyncModulesPlugin.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
const isDependencyKind = require("../graph/isDependencyKind");
99

1010
/** @import Compiler from "../Compiler" */
11-
/** @import Module from "../module/Module" */
11+
/** @import Module, { BuildMeta } from "../module/Module" */
1212

1313
const PLUGIN_NAME = "InferAsyncModulesPlugin";
1414

@@ -42,7 +42,9 @@ class InferAsyncModulesPlugin {
4242
(isDependencyKind(c.dependency, "esm-import") ||
4343
// only an ESM module has the async wrapper to await it in
4444
(isDependencyKind(c.dependency, "provided") &&
45-
originModule.buildMeta.exportsType === "namespace")) &&
45+
/** @type {BuildMeta} */
46+
(/** @type {Module} */ (originModule).buildMeta)
47+
.exportsType === "namespace")) &&
4648
c.isTargetActive(undefined)
4749
)
4850
) {

0 commit comments

Comments
 (0)