import { type mongoose } from "https://deno.land/x/mongoose@7.7.0/types/index.d.ts";
const { ToObjectOptions } = mongoose;
Type Parameters
optional
THydratedDocumentType = HydratedDocument<unknown>Properties
if options.virtuals = true
, you can set options.aliases = false
to skip applying aliases. This option is a no-op if options.virtuals = false
.
optional
transform: boolean | ((doc: THydratedDocumentType,
ret: Record<string, any>,
options: ToObjectOptions<THydratedDocumentType>,
if set, mongoose will call this function to allow you to transform the returned object
if true, replace any conventionally populated paths with the original id in the output. Has no affect on virtual populated paths.