On this page

new ModuleGraphConnection(originModule, dependency, module, explanation?, weak?, condition?): ModuleGraphConnection
Attributes
originModule:<Module> | <null>
the referencing module
dependency:<Dependency> | <null>
the referencing dependency
module:<Module>
the referenced module
explanation:<string>
some extra detail
the reference is weak
condition:
<false> | <Function> | <null> condition for the connection

Creates an instance of ModuleGraphConnection.

addCondition(condition): void
Attributes
condition:<Function>
condition for the connection
Returns:<void>

Adds the provided condition to the module graph connection.


addExplanation(explanation): void
Attributes
explanation:<string>
the explanation to add
Returns:<void>

Adds the provided explanation to the module graph connection.


clone(): ModuleGraphConnection

getActiveState(runtime): ConnectionState
Attributes
the runtime
true: fully active, false: inactive, TRANSITIVE: direct module inactive, but transitive connection maybe active

Returns true: fully active, false: inactive, TRANSITIVE: direct module inactive, but transitive connection maybe active.


isActive(runtime): boolean
Attributes
the runtime
Returns:<boolean>
true, if the connection is active

Checks whether this module graph connection is active.


isTargetActive(runtime): boolean
Attributes
the runtime
Returns:<boolean>
true, if the connection is active

Checks whether this module graph connection is target active.


setActive(value): void
Attributes
value:<boolean>
active or not
Returns:<void>

Updates active using the provided value.