From cdeb13e7744226addde443bfabd6df7db1989410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20Vince?= Date: Fri, 1 Sep 2017 10:26:08 +0200 Subject: [PATCH] Make DocumentScope generic (accepts document model) --- types/nano/index.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/types/nano/index.d.ts b/types/nano/index.d.ts index 2378d3eb8b..59ff766010 100644 --- a/types/nano/index.d.ts +++ b/types/nano/index.d.ts @@ -8,7 +8,7 @@ import { Request, CoreOptions } from "request"; declare function nano( config: nano.Configuration | string -): nano.ServerScope | nano.DocumentScope; +): nano.ServerScope | nano.DocumentScope; declare namespace nano { interface Configuration { @@ -24,8 +24,8 @@ declare namespace nano { interface ServerScope { readonly config: ServerConfig; db: DatabaseScope; - use(db: string): DocumentScope; - scope(db: string): DocumentScope; + use(db: string): DocumentScope; + scope(db: string): DocumentScope; request: RequestFunction; relax: RequestFunction; dinosaur: RequestFunction; @@ -41,11 +41,11 @@ declare namespace nano { get(name: string, callback?: Callback): Request; destroy(name: string, callback?: Callback): Request; list(callback?: Callback): Request; - use(db: string): DocumentScope; + use(db: string): DocumentScope; compact(name: string, designname?: string, callback?: Callback): Request; - replicate( - source: string | DocumentScope, - target: string | DocumentScope, + replicate( + source: string | DocumentScope, + target: string | DocumentScope, options?: any, callback?: Callback ): Request; @@ -59,11 +59,11 @@ declare namespace nano { updates(params?: UpdatesParams, callback?: Callback): Request; } - interface DocumentScope { + interface DocumentScope { readonly config: ServerConfig; info(callback?: Callback): Request; replicate( - target: string | DocumentScope, + target: string | DocumentScope, options?: any, callback?: Callback ): Request;