mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
nano - add missing db.attachment.get signature that returns a ReadableStream (#19634)
* Added a missing db.attachment.get signature * nano package version number bumped to 6.4 in index.d.ts
This commit is contained in:
3
types/nano/index.d.ts
vendored
3
types/nano/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for nano 6.2
|
||||
// Type definitions for nano 6.4
|
||||
// Project: https://github.com/apache/couchdb-nano
|
||||
// Definitions by: Tim Jacobi <https://github.com/timjacobi>
|
||||
// Kovács Vince <https://github.com/vincekovacs>
|
||||
@@ -282,6 +282,7 @@ declare namespace nano {
|
||||
params: any,
|
||||
callback?: Callback<any>
|
||||
): Request;
|
||||
get(docname: string, attname: string): NodeJS.ReadableStream;
|
||||
get(docname: string, attname: string, callback?: Callback<any>): Request;
|
||||
get(
|
||||
docname: string,
|
||||
|
||||
@@ -127,8 +127,15 @@ mydb.attachment.insert(
|
||||
"text/plain",
|
||||
(error: any, att: any) => {}
|
||||
);
|
||||
const attInsert: NodeJS.WritableStream = mydb.attachment.insert(
|
||||
"new",
|
||||
"att",
|
||||
null,
|
||||
"text/plain"
|
||||
);
|
||||
mydb.attachment.destroy("new", "att", { rev: "123" }, (err, response) => {});
|
||||
mydb.attachment.get("new_string", "att", (error: any, helloWorld: any) => {});
|
||||
const attGet: NodeJS.ReadableStream = mydb.attachment.get("new_string", "att");
|
||||
|
||||
/*
|
||||
* Multipart
|
||||
|
||||
Reference in New Issue
Block a user