sarkistlt / mongoose-schema-to-graphql

Use Mongoose schema to generate graphQL type.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing [string] to string[] in index.d.ts

kontheocharis opened this issue · comments

Hi,

In the Typescript declaration file, shouldn't the exclude field in the type ConfigurationObject be a string[] (string array) instead of a [string] (tuple with one element of type string)? If the latter is used (which it is), Typescript throws an error when having more than one element in the array (i.e. when excluding multiple fields).

Basically, shouldn't this
exclude?: RegExp | [string],
be changed to this
exclude?: RegExp | string[],

Thanks.

yes you right, fixed, thanks!