addPairConsumerPorts<InterfaceType extends PairInterface> method

InterfaceType addPairConsumerPorts<InterfaceType extends PairInterface>(
  1. PairConsumer<InterfaceType> source, {
  2. String uniquify(
    1. String original
    )?,
})

Registers a consumer source endpoint and returns its internal clone.

This is the type-safe equivalent of addPairInterfacePorts with PairRole.consumer. Module logic must use the returned clone rather than the interface wrapped by source.

Implementation

InterfaceType addPairConsumerPorts<InterfaceType extends PairInterface>(
  PairConsumer<InterfaceType> source, {
  String Function(String original)? uniquify,
}) =>
    addPairInterfacePorts(
      source.interface,
      PairRole.consumer,
      uniquify: uniquify,
    );