kossnocorp / typesaurus

🦕 Type-safe TypeScript-first ODM for Firestore
https://typesaurus.com
415 stars 36 forks source link

Allow readonly array in where #109

Open SrBrahma opened 2 years ago

SrBrahma commented 2 years ago

Allows

const array = ['a', 'b'] as const;
query(doc, [where('key', 'in', array)])

Without this PR, an error is throw:

No overload matches this call.
  The last overload gave the following error.
    Argument of type 'string' is not assignable to parameter of type '[keyof DbOrder, string | number | symbol, string | number | symbol, string | number | symbol, string | number | symbol, string | number | symbol, string | number | symbol, string | ... 1 more ... | symbol, string | ... 1 more ... | symbol, string | ... 1 more ... | symbol]'.