Load plugin in mongoose typescript model class

Viewed 64

I am trying to load plugin inside mongoSchema inside typescript its getting loaded but it always shows error. Like

enter image description here

So not able to build the api. The flow is like include the library for pagination:

enter image description here

After that I have interface for document

enter image description here

Then interface for model

enter image description here

and then created model class where i am using this method

enter image description here

Then i loaded the class and plugin also but the error is still there. Tried to place plugin load after schema but same error persist.

enter image description here

Can anyone please tell me what am i doing wrong.

0 Answers
Related