Skip to content

Commit e236e7d

Browse files
glynnbirdGlynn Bird
andauthored
fix RequestDefaultOptions TypeScript definitions as per issue #240 (#241)
Co-authored-by: Glynn Bird <glynnbird@apache.org>
1 parent f708ba0 commit e236e7d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/nano.d.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,21 @@ declare function nano(
1616
): nano.ServerScope;
1717

1818
declare namespace nano {
19-
interface requestDefaultsOptions {
19+
interface RequestDefaultOptionsAuth {
20+
username: string,
21+
password: string
22+
}
23+
interface RequestDefaultsOptions {
2024
timeout: number;
2125
agent: any;
2226
headers: object;
27+
auth: RequestDefaultOptionsAuth;
2328
}
2429

2530
interface Configuration {
2631
url: string;
2732
cookie?: string;
28-
requestDefaults?: requestDefaultsOptions;
33+
requestDefaults?: RequestDefaultsOptions;
2934
log?(id: string, args: any): void;
3035
parseUrl?: boolean;
3136
request?(params: any): void;

0 commit comments

Comments
 (0)