import { Satisfies, Unreachable } from "../../type"; import { Fold } from "../list"; import { $, HKT, _, I } from ".."; type EMPTY_STRING = ''; interface Joiner extends HKT { [HKT.i]: Satisfies<_, [acc: string, cur: string]>; [HKT.o]: I extends [infer Acc extends string, infer Cur extends string] ? Acc extends EMPTY_STRING ? `${Cur}` : `${Acc}${Sep}${Cur}` : Unreachable; } /** * joins a list of strings with a separator * * @since 0.0.5 */ export interface Join extends HKT { [HKT.i]: Satisfies<_, readonly string[]>; [HKT.o]: $, EMPTY_STRING>, I>; } export {}; //# sourceMappingURL=join.d.ts.map