Type Alias RepeatString<S, N>

RepeatString<S, N>: N extends 1
    ? S
    : `${S}${RepeatString<S, DecrementNumber[N]>}`

repeat a string S for up to N = 10 times

Type Parameters

  • S extends string
  • N extends number