addPairInterface<InterfaceType extends PairInterface> method

InterfaceType addPairInterface<InterfaceType extends PairInterface>(
  1. InterfaceType source,
  2. PairRole role, {
  3. String uniquify(
    1. String original
    )?,
})

Clones source, registers it for the selected role, and returns the clone for use by the module implementation.

This is the pair-interface equivalent of addInterface. The role determines which directions are inputs and outputs at the module boundary, while the pair interface retains its specialized connection behavior.

Implementation

InterfaceType addPairInterface<InterfaceType extends PairInterface>(
  InterfaceType source,
  PairRole role, {
  String Function(String original)? uniquify,
}) =>
    addPairInterfacePorts(source, role, uniquify: uniquify);