You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by gl...@apache.org on 2020/09/17 08:22:46 UTC
[couchdb-nano] branch master updated: fix(nano.d.ts): add opts and
callback for relax (#225)
This is an automated email from the ASF dual-hosted git repository.
glynnbird pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git
The following commit(s) were added to refs/heads/master by this push:
new 2642e09 fix(nano.d.ts): add opts and callback for relax (#225)
2642e09 is described below
commit 2642e095b0deedf9ecc7aec9a180ecd0a4b2e08a
Author: Steven Tang <st...@gmail.com>
AuthorDate: Thu Sep 17 18:22:40 2020 +1000
fix(nano.d.ts): add opts and callback for relax (#225)
* fix(nano.d.ts): add opts and callback for nano.request
* fix(nano.d.ts): add opts and callback for relax and dinosaur
---
lib/nano.d.ts | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/lib/nano.d.ts b/lib/nano.d.ts
index 8f778bb..b59a6fc 100644
--- a/lib/nano.d.ts
+++ b/lib/nano.d.ts
@@ -33,9 +33,9 @@ declare namespace nano {
db: DatabaseScope;
use<D>(db: string): DocumentScope<D>;
scope<D>(db: string): DocumentScope<D>;
- request: Promise<any>;
- relax: Promise<any>;
- dinosaur: Promise<any>;
+ request(opts: RequestOptions | string, callback?: Callback<any>): Promise<any>;
+ relax(opts: RequestOptions | string, callback?: Callback<any>): Promise<any>;
+ dinosaur(opts: RequestOptions | string, callback?: Callback<any>): Promise<any>;
// http://docs.couchdb.org/en/latest/api/server/authn.html#cookie-authentication
auth(username: string, userpass: string, callback?: Callback<DatabaseAuthResponse>): Promise<DatabaseAuthResponse>;
// http://docs.couchdb.org/en/latest/api/server/authn.html#get--_session
@@ -425,11 +425,6 @@ declare namespace nano {
db: string;
}
- type RequestFunction = (
- options?: RequestOptions | string,
- callback?: Callback<any>
- ) => void;
-
interface RequestOptions {
db?: string;
method?: string;