deno.land / x / mongoose@6.7.5 / test / types / querycursor.test.ts

querycursor.test.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
import { Schema, model, Document, Types } from 'mongoose';
const schema: Schema = new Schema({ name: { type: 'String' } });
interface ITest extends Document { name?: string;}
const Test = model<ITest>('Test', schema);
Test.find().cursor().eachAsync(async(doc: ITest) => console.log(doc.name)). then(() => console.log('Done!'));
mongoose

Version Info

Tagged at
a year ago