Function convertToMongoObjectId

  • Convert input to mongo ObjectId

    Throws

    BSONError or BSONTypeError if input is invalid ObjectId

    Parameters

    • x: string | ObjectId

    Returns ObjectId | BSONError

Generated using TypeDoc