mirror of https://github.com/mongodb/mongo
SERVER-103603: Support .d.ts typings for common "conn" and "db" workflows (#35071)
GitOrigin-RevId: cce8abff91406ea4ed5be849ea3e041b4ac0bc86
This commit is contained in:
parent
fe4ae2cca3
commit
9661e67028
|
|
@ -11,5 +11,8 @@
|
|||
"src/mongo/shell/*.js",
|
||||
"src/mongo/shell/*.d.ts",
|
||||
"src/third_party/fast_check/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"jstests/libs/override_methods/"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ function setupTest() {
|
|||
print("START auth1.js");
|
||||
baseName = "jstests_auth_auth1";
|
||||
|
||||
m = MongoRunner.runMongod({auth: "", bind_ip: "127.0.0.1", useHostname: false});
|
||||
let m = MongoRunner.runMongod({auth: "", bind_ip: "127.0.0.1", useHostname: false});
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ declare class DBCollection {
|
|||
getName()
|
||||
help()
|
||||
getFullName()
|
||||
getMongo()
|
||||
getDB()
|
||||
getMongo(): Mongo
|
||||
getDB(): DB
|
||||
find(filter, projection, limit, skip, batchSize, options)
|
||||
insert(obj, options)
|
||||
remove(t, justOne)
|
||||
|
|
|
|||
|
|
@ -17,11 +17,9 @@ declare class DB {
|
|||
[collectionIndex: string]: DBCollection
|
||||
|
||||
rotateCertificates(message)
|
||||
getMongo()
|
||||
getSiblingDB(name)
|
||||
getName()
|
||||
getSiblingDB(name): DB
|
||||
stats(opt)
|
||||
getCollection(name)
|
||||
getCollection(name): DBCollection
|
||||
commandHelp(name)
|
||||
runReadCommand()
|
||||
runCommand(obj, extra, queryOptions)
|
||||
|
|
|
|||
|
|
@ -2,11 +2,7 @@
|
|||
|
||||
declare class Mongo {
|
||||
constructor(uri?: string, encryptedDBClientCallback?, options?: object)
|
||||
|
||||
getDB(name): DB
|
||||
|
||||
startSession(opts?): DriverSession
|
||||
|
||||
find(ns, query, fields, limit, skip, batchSize, options)
|
||||
insert(ns, obj)
|
||||
remove(ns, pattern)
|
||||
|
|
@ -15,7 +11,7 @@ declare class Mongo {
|
|||
getSlaveOk()
|
||||
setSecondaryOk(value = true)
|
||||
getSecondaryOk()
|
||||
getDB(name)
|
||||
getDB(name: string): DB
|
||||
getDBs(driverSession)
|
||||
adminCommand(cmd)
|
||||
runCommand(dbname, cmd, options)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// type declarations for servers.js
|
||||
|
||||
declare module MongoRunner {
|
||||
export function runMongod(opts?: object): Mongo
|
||||
export function stopMongod(connection: Mongo): void
|
||||
function runMongod(opts?: object): Mongo
|
||||
function stopMongod(connection: Mongo): void
|
||||
}
|
||||
|
||||
declare function myPort()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// type declarations for utils_sh.js
|
||||
|
||||
declare var db
|
||||
declare var db: DB
|
||||
declare function printShardingStatus()
|
||||
|
|
|
|||
Loading…
Reference in New Issue