tryAsTyped<PortType extends Logic> method
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;