Skip to content

Instantly share code, notes, and snippets.

View sagar88826's full-sized avatar

Sagar Mandal sagar88826

  • Techinterio
  • Noida, India
  • 19:28 (UTC -12:00)
  • X @twt_sagar
View GitHub Profile
import mongoose, { InferSchemaType, Require_id } from "mongoose";
// ##########################################################################################
// ######################################BLUEPRINT START#####################################
// ##########################################################################################
// Speciality of this blueprint
// 1. It will convert the document object array type to lean object array type
// 2. It will handle both optional and required fields of type array and object as well as nested object and array
// 3. No manual document interface creation is required