import type { Args, Fn } from "../HKT"; import type { Nat } from "../Num"; import type { Dec } from "../Num/Int/Dec"; import type { AssertStr } from "../helpers"; export type Repeat = AssertStr< Nat extends N ? string : N extends 0 ? "" : // @ts-ignore - Type instantiation is excessively deep and possibly infinite. `${S}${Repeat, S>}` >; export default interface RepeatFn extends Fn<[Nat, string], string> { def: ([n, s]: Args) => Repeat; }