Ad
  • Custom User Avatar

    Yes, it is, and it is probably the best way to do things like this. I could've added a constraint to the generic parameter (A extends ReadonlyArray<unknown>) but chose not to because it would've made the recursive solution a lot more annoying. Do you have any test cases you want me to add?