ts-mongoose icon indicating copy to clipboard operation
ts-mongoose copied to clipboard

How to get populateTs to import

Open BrennenRocks opened this issue 4 years ago • 1 comments

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?

BrennenRocks avatar Feb 10 '21 07:02 BrennenRocks

Did you manage to make it work?

ChrisCoder9000 avatar May 30 '23 13:05 ChrisCoder9000