diff --git a/index.d.ts b/index.d.ts index 31e43707499..5bd3928a3df 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1036,6 +1036,8 @@ declare module 'mongoose' { * always set `path` to a document. Inferred from schema by default. */ justOne?: boolean; + /** transform function to call on every populated doc */ + transform?: (doc: any, id: any) => any; } interface ToObjectOptions {