tryAsTyped<PortType extends Logic> method

TypedPortReference<PortType>? tryAsTyped<PortType extends Logic>()

Returns this reference as a TypedPortReference, or null if its root port is not a PortType.

Implementation

TypedPortReference<PortType>? tryAsTyped<PortType extends Logic>() =>
    port is PortType ? TypedPortReference<PortType>._(this) : null;