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
weak:boolean
the reference is weak
condition:false | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState) | null
condition for the connection

Creates an instance of ModuleGraphConnection.

Attributes
condition:false | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState) | null
conditional:boolean
dependency:Dependency | null
explanation:string
explanations:Set<string>
module:Module
originModule:Module | null
resolvedModule:Module
resolvedOriginModule:Module | null
weak:boolean
addConnectionStates:(a: ConnectionState, b: ConnectionState) => ConnectionState
Adds connection states.
CIRCULAR_CONNECTION:typeof CIRCULAR_CONNECTION
While determining the active state, this flag is used to signal a circular connection.
TRANSITIVE_ONLY:typeof TRANSITIVE_ONLY
Module itself is not connected, but transitive modules are connected transitively.
addCondition(condition): void
Attributes
condition:(moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState
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
runtime:RuntimeSpec
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
runtime:RuntimeSpec
the runtime
Returns:boolean
true, if the connection is active

Checks whether this module graph connection is active.


isTargetActive(runtime): boolean
Attributes
runtime:RuntimeSpec
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.