ts-mongoose
ts-mongoose copied to clipboard
How to get populateTs to import
I have a model in it's own file which has a ref to another model in a different file. Then in my controller I import 'ts-mongoose/plugin';
and attempt to use it after a find() operation await Account.find().populateTs('user');
but populateTs has an error "Property 'populateTs' does not exist on type 'Query<any[], any>'. Did you mean 'populate'?"
How is this meant to be implemented?
Did you manage to make it work?