when<T> method

T when<T>({
  1. required T client(),
  2. required T federation(),
})

Implementation

T when<T>({
  required T Function() client,
  required T Function() federation,
}) =>
    {
      EventFormat.client: client,
      EventFormat.federation: federation,
    }[this]!();