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.