Skip to content

Commit 423ae06

Browse files
authored
Fix Headers Typing (#853)
1 parent 3fadb55 commit 423ae06

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

generator/typescript/index.d.tstemplate

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Auto-generated by Stone, do not modify.
22

3-
import { Headers } from 'node-fetch';
43
/*IMPORT*/
54
export * from './dropbox_types';
65

@@ -185,17 +184,17 @@ export class DropboxResponseError<T> {
185184
/**
186185
* The response class of HTTP errors from API calls using the Dropbox SDK.
187186
*/
188-
constructor(status: number, headers: Headers, error: T);
187+
constructor(status: number, headers: any, error: T);
189188

190189
/**
191190
* HTTP Status code of the call
192191
*/
193192
status: number;
194193

195194
/**
196-
* Headers returned from the call
195+
* Headers returned from the call. Set as any to support both node and browser.
197196
*/
198-
headers: Headers;
197+
headers: any;
199198

200199
/**
201200
* Serialized Error of the call
@@ -207,17 +206,17 @@ export class DropboxResponse<T> {
207206
/**
208207
* The response class of all successful API calls using the Dropbox SDK.
209208
*/
210-
constructor(status: number, headers: Headers, result: T);
209+
constructor(status: number, headers: any, result: T);
211210

212211
/**
213212
* HTTP Status code of the call
214213
*/
215214
status: number;
216215

217216
/**
218-
* Headers returned from the call
217+
* Headers returned from the call. Set as any to support both node and browser.
219218
*/
220-
headers: Headers;
219+
headers: any;
221220

222221
/**
223222
* Serialized Result of the call

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dropbox",
3-
"version": "10.17.0",
3+
"version": "10.18.0",
44
"registry": "npm",
55
"description": "The Dropbox JavaScript SDK is a lightweight, promise based interface to the Dropbox v2 API that works in both nodejs and browser environments.",
66
"main": "cjs/index.js",

types/index.d.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// Auto-generated by Stone, do not modify.
22

3-
import { Headers } from 'node-fetch';
4-
53
import { account, async, auth, check, common, contacts, file_properties, file_requests, files, paper, secondary_emails, seen_state, sharing, team, team_common, team_log, team_policies, users, users_common } from './dropbox_types';
64
export * from './dropbox_types';
75

@@ -186,17 +184,17 @@ export class DropboxResponseError<T> {
186184
/**
187185
* The response class of HTTP errors from API calls using the Dropbox SDK.
188186
*/
189-
constructor(status: number, headers: Headers, error: T);
187+
constructor(status: number, headers: any, error: T);
190188

191189
/**
192190
* HTTP Status code of the call
193191
*/
194192
status: number;
195193

196194
/**
197-
* Headers returned from the call
195+
* Headers returned from the call. Set as any to support both node and browser.
198196
*/
199-
headers: Headers;
197+
headers: any;
200198

201199
/**
202200
* Serialized Error of the call
@@ -208,17 +206,17 @@ export class DropboxResponse<T> {
208206
/**
209207
* The response class of all successful API calls using the Dropbox SDK.
210208
*/
211-
constructor(status: number, headers: Headers, result: T);
209+
constructor(status: number, headers: any, result: T);
212210

213211
/**
214212
* HTTP Status code of the call
215213
*/
216214
status: number;
217215

218216
/**
219-
* Headers returned from the call
217+
* Headers returned from the call. Set as any to support both node and browser.
220218
*/
221-
headers: Headers;
219+
headers: any;
222220

223221
/**
224222
* Serialized Result of the call

0 commit comments

Comments
 (0)