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

connect.test.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import mongoose, { connect } from 'mongoose';import { expectType } from 'tsd';
// PromiseexpectType<Promise<typeof mongoose>>(connect('mongodb://localhost:27017/test'));expectType<Promise<typeof mongoose>>(connect('mongodb://localhost:27017/test', {}));expectType<Promise<typeof mongoose>>(connect('mongodb://localhost:27017/test', { bufferCommands: true }));
// CallbackexpectType<void>(connect('mongodb://localhost:27017/test', (err: Error | null) => { return;}));expectType<void>(connect('mongodb://localhost:27017/test', {}, (err: Error | null) => { return;}));expectType<void>(connect('mongodb://localhost:27017/test', { bufferCommands: true }, (err: Error | null) => { return;}));
mongoose

Version Info

Tagged at
a year ago