import type { Semigroup, Semigroup$GetConstruct, Semigroup$GetTypeClass } from "."; import type { Args, Call2W, Cons, Fn } from "../../HKT"; import type { IsAny } from "../../helpers"; /** * Concat two {@link Semigroup} instances. * * Sig: `(s1: Semigroup, s2: Semigroup) => Semigroup` * * Type safety is **not guaranteed** if `S1` and `S2` are not of the same construct. */ export type Concat = [IsAny, IsAny] extends [true, true] ? Semigroup : IsAny extends true ? Semigroup$GetConstruct : IsAny extends true ? Semigroup$GetConstruct : Call2W["Concat"], S1, S2>; /** * [Fn] Concat two {@link Semigroup} instances. * * Sig: `>(s1: S, s2: S) => S` */ export default interface ConcatFn> extends Fn<[S, S], S> { def: ([s1, s2]: Args) => Concat; }