new ModuleGraphConnection(originModule, dependency, module, explanation?, weak?, condition?): ModuleGraphConnectionAttributes
originModule:
Module | nullthe referencing module
dependency:
Dependency | nullthe referencing dependency
module:
Modulethe referenced module
explanation:
stringsome extra detail
weak:
booleanthe reference is weak
condition:
false | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState) | nullcondition for the connection
Returns:
ModuleGraphConnectionCreates an instance of ModuleGraphConnection.
Attributes
condition:
false | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState) | nullconditional:
booleandependency:
Dependency | nullexplanation:
stringmodule:
ModuleoriginModule:
Module | nullresolvedModule:
ModuleresolvedOriginModule:
Module | nullweak:
booleanaddConnectionStates:
(a: ConnectionState, b: ConnectionState) => ConnectionStateAdds connection states.
CIRCULAR_CONNECTION:
typeof CIRCULAR_CONNECTIONWhile determining the active state, this flag is used to signal a circular connection.
TRANSITIVE_ONLY:
typeof TRANSITIVE_ONLYModule itself is not connected, but transitive modules are connected transitively.
addCondition(condition): voidAttributes
condition:
(moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionStatecondition for the connection
Returns:
voidAdds the provided condition to the module graph connection.
addExplanation(explanation): voidAttributes
Adds the provided explanation to the module graph connection.
clone(): ModuleGraphConnectionReturns:
ModuleGraphConnectiongetActiveState(runtime): ConnectionStateAttributes
runtime:
RuntimeSpecthe runtime
Returns:
ConnectionStatetrue: 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): booleanAttributes
runtime:
RuntimeSpecthe runtime
Returns:
booleantrue, if the connection is active
Checks whether this module graph connection is active.
isTargetActive(runtime): booleanAttributes
runtime:
RuntimeSpecthe runtime
Returns:
booleantrue, if the connection is active
Checks whether this module graph connection is target active.
setActive(value): voidAttributes
Updates active using the provided value.