Gentype with variadic arguments

Does gentype for TypeScript support variadic arguments? This doesn’t work for me. The variadic parameter is not rendered in TypeScript as a spread argument. Do I have to enumerate all the variations with 1, 2, 3, etc. parameters?

  @genType.import("firebase/firestore") @variadic
  external _collection: (t, string, array<string>) => collectionReference<documentdata> =
    "collection"

And the generated TypeScript that does not compile.

export const collectionTypeChecked: (_1:t, _2:string, _3:string[]) => collectionReference<documentdata> = collectionNotChecked;

===
UPDATE - Realizing I’m kind of stuck here. I was thinking of doing the import on a flavor of the function with perhaps 5 values and then create overrides like “createCollection1”, “createCollection2”, etc. that pass in a different number of parameters. But this won’t compile. It will only compile if I give it all 5 values.

I think this works. A hack. Don’t know why the variadic decorator is ignored by GenType. I can expose a single variadic ReScript function and dynamically choose which of these to pass the array arguments to.

@genType.import(("firebase/firestore", "collection"))
external _collection2: (t, string, string) => collectionReference<documentdata> = "collection2"

@genType.import(("firebase/firestore", "collection"))
external _collection3: (t, string, string, string) => collectionReference<documentdata> =
  "collection3"

@genType.import(("firebase/firestore", "collection"))
external _collection4: (t, string, string, string, string) => collectionReference<documentdata> =
  "collection4"