export type ConnectionList = SortedSet.SortedSet<Connection.Connection>;
export const from = (data: readonly ConnectionOutputDto[]) =>
Effect.forEach(data, Connection.from, {
concurrency: 'unbounded',
}).pipe(
Effect.map(SortedSet.fromIterable(OrderByLastMessage)),
Effect.map((a): ConnectionList => a), // Without this, the type is SortedSet.SortedSet<Connection.Connection>
);
export type ConnectionList = SortedSet.SortedSet<Connection.Connection>;
export const from = (data: readonly ConnectionOutputDto[]) =>
Effect.forEach(data, Connection.from, {
concurrency: 'unbounded',
}).pipe(
Effect.map(SortedSet.fromIterable(OrderByLastMessage)),
Effect.map((a): ConnectionList => a), // Without this, the type is SortedSet.SortedSet<Connection.Connection>
);