Daniel Diaz

Results 37 comments of Daniel Diaz

Not like visual studio code where everything is a different color depending on the file type. I guess cmd if we're on the same page. So the text could be...

So is that a no to just a uniform text color? @JasonStein

```javascript const mongoose = require('mongoose'); const mongooseAutoPopulate = require('mongoose-autopopulate'); const id = new mongoose.Types.ObjectId(); const subjectId = new mongoose.Types.ObjectId(); const teacherSchema = new mongoose.Schema({ schoolClass: {type: mongoose.Schema.Types.ObjectId, ref: 'SchoolClass', autopopulate:...

```javascript const mongoose = require('mongoose'); const testSchema = new mongoose.Schema({ name: String }); testSchema.pre('insertMany', (docs, next) => { console.log('==========================PRE===========================') console.log('first', docs); console.log('second', next); if(Array.isArray(docs)) { next(); } else { docs();...

```typescript import {Mongoose} from 'mongoose' export class Database extends Mongoose { public async connect(): Promise { await this.connect(); return true; } } ```

![image](https://user-images.githubusercontent.com/39510674/187711998-bf118b26-2119-4330-bbde-29f35b9c51af.png) ``` 12363.ts:49:29 - error TS2551: Property 'target' does not exist on type '{ targetType?: {}; targetId?: { toString: any; _bsontype?: { toString: {}; _bsontype?: ObjectId; inspect?: {}; equals?: {};...

![image](https://user-images.githubusercontent.com/39510674/208138370-40f6c475-af76-431f-b4a7-9f70ebe4b0f8.png) ```typescirpt import { Schema, model, connect, connection, createConnection } from 'mongoose'; // 1. Create an interface representing a document in MongoDB. interface IUser { name: string; email: string; avatar?:...

![image](https://user-images.githubusercontent.com/39510674/208144473-677cecaa-7e54-42e9-966d-c08db31170fb.png) no change

![image](https://user-images.githubusercontent.com/39510674/208164382-43c98fa3-6c4f-4601-bc03-2ed58f06050f.png) My b

```javascript const mongoose = require('mongoose'); const testSchema = new mongoose.Schema({ studentId: String }); const Test = mongoose.model('Test', testSchema); async function run() { await mongoose.connect('mongodb://localhost:27017'); const iterations = 1000000; console.log(`begin creating...