Skip to content

Commit 0ce7f60

Browse files
pd4d10gr2m
authored andcommittedDec 24, 2019
feat(typescript): deprecate client options (#1538)
1 parent 9805086 commit 0ce7f60

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed
 

‎index.d.ts

+12-4
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,18 @@ declare namespace Octokit {
6868
agent?: http.Agent;
6969
timeout?: number;
7070
};
71-
timeout?: number; // Deprecated
72-
headers?: { [header: string]: any }; // Deprecated
73-
agent?: http.Agent; // Deprecated
71+
/**
72+
* @deprecated Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request
73+
*/
74+
timeout?: number;
75+
/**
76+
* @deprecated Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request
77+
*/
78+
headers?: { [header: string]: any };
79+
/**
80+
* @deprecated Use {request: {agent}} instead. See https://github.com/octokit/request.js#request
81+
*/
82+
agent?: http.Agent;
7483
[option: string]: any;
7584
}
7685

@@ -9113,7 +9122,6 @@ declare namespace Octokit {
91139122
node_id: string;
91149123
pull_request_url: string;
91159124
state: string;
9116-
submitted_at: string;
91179125
user: PullsListReviewsResponseItemUser;
91189126
};
91199127
type PullsListReviewRequestsResponseUsersItem = {

‎scripts/update-endpoints/templates/index.d.ts.tpl

+12-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,18 @@ declare namespace Octokit {
5959
agent?: http.Agent;
6060
timeout?: number
6161
};
62-
timeout?: number; // Deprecated
63-
headers?: {[header: string]: any}; // Deprecated
64-
agent?: http.Agent; // Deprecated
62+
/**
63+
* @deprecated Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request
64+
*/
65+
timeout?: number;
66+
/**
67+
* @deprecated Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request
68+
*/
69+
headers?: {[header: string]: any};
70+
/**
71+
* @deprecated Use {request: {agent}} instead. See https://github.com/octokit/request.js#request
72+
*/
73+
agent?: http.Agent;
6574
[option: string]: any;
6675
}
6776

0 commit comments

Comments
 (0)
Please sign in to comment.