mongodb-js / mongoose-autopopulate

Always populate() certain fields in your mongoose schemas
Apache License 2.0
221 stars 36 forks source link

Missing types for plugin configuration #114

Open jamesdanielgibbs opened 1 year ago

jamesdanielgibbs commented 1 year ago

This PR added native types which is much appreciated.

Sadly though, these types don't cover cases where specific functions need to be configured for the plugin. So the following results in Typescript compilation issues:

someSchema(mongooseAutoPopulate, { functions: ['findOne'] })

Screenshot 2023-05-24 at 21 00 50

Package versions

Happy to throw a PR together so solve this issue - just want to find out if this is a me-only problem.

vkarpov15 commented 1 year ago

This seems like a legitimate issue, if you're willing to put in a PR that would be much appreciated :+1: