mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
Merge pull request #17473 from alanmarcell/master
Add mongodb return type WriteOpResult to Collection.replaceOne(...)
This commit is contained in:
Vendored
+5
-4
@@ -1,6 +1,7 @@
|
||||
// Type definitions for MongoDB v2.2
|
||||
// Project: https://github.com/mongodb/node-mongodb-native/tree/2.2
|
||||
// Definitions by: Federico Caselli <https://github.com/CaselIT>
|
||||
// Alan Marcell <https://github.com/alanmarcell>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -585,10 +586,10 @@ export interface Collection<TSchema = Default> {
|
||||
rename(newName: string, callback: MongoCallback<Collection<TSchema>>): void;
|
||||
rename(newName: string, options?: { dropTarget?: boolean }): Promise<Collection<TSchema>>;
|
||||
rename(newName: string, options: { dropTarget?: boolean }, callback: MongoCallback<Collection<TSchema>>): void;
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#replaceOne
|
||||
replaceOne(filter: Object, doc: Object, callback: MongoCallback<UpdateWriteOpResult>): void;
|
||||
replaceOne(filter: Object, doc: Object, options?: ReplaceOneOptions): Promise<UpdateWriteOpResult>;
|
||||
replaceOne(filter: Object, doc: Object, options: ReplaceOneOptions, callback: MongoCallback<UpdateWriteOpResult>): void;
|
||||
//http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#replaceOne
|
||||
replaceOne(filter: Object, doc: Object, callback: MongoCallback<UpdateWriteOpResult & { ops: Array<any> }>): void;
|
||||
replaceOne(filter: Object, doc: Object, options?: ReplaceOneOptions): Promise<UpdateWriteOpResult & { ops: Array<any> }>;
|
||||
replaceOne(filter: Object, doc: Object, options: ReplaceOneOptions, callback: MongoCallback<UpdateWriteOpResult & { ops: Array<any> }>): void;
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#save
|
||||
/** @deprecated Use insertOne, insertMany, updateOne or updateMany */
|
||||
save(doc: Object, callback: MongoCallback<WriteOpResult>): void;
|
||||
|
||||
Reference in New Issue
Block a user