File tree 1 file changed +16
-8
lines changed
1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change 1
1
import { Octokit as Core } from "@octokit/core" ;
2
2
import { requestLog } from "@octokit/plugin-request-log" ;
3
- import { paginateRest } from "@octokit/plugin-paginate-rest" ;
3
+ import {
4
+ paginateRest ,
5
+ type PaginateInterface ,
6
+ } from "@octokit/plugin-paginate-rest" ;
4
7
import { legacyRestEndpointMethods } from "@octokit/plugin-rest-endpoint-methods" ;
5
8
export type { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods" ;
6
9
7
10
import { VERSION } from "./version.js" ;
8
11
9
- export const Octokit = Core . plugin (
10
- requestLog ,
11
- legacyRestEndpointMethods ,
12
- paginateRest ,
13
- ) . defaults ( {
14
- userAgent : `octokit-rest.js/${ VERSION } ` ,
15
- } ) ;
12
+ type Constructor < T > = new ( ...args : any [ ] ) => T ;
13
+
14
+ export const Octokit : typeof Core &
15
+ Constructor <
16
+ ReturnType < typeof legacyRestEndpointMethods > & {
17
+ paginate : PaginateInterface ;
18
+ }
19
+ > = Core . plugin ( requestLog , legacyRestEndpointMethods , paginateRest ) . defaults (
20
+ {
21
+ userAgent : `octokit-rest.js/${ VERSION } ` ,
22
+ } ,
23
+ ) ;
16
24
17
25
export type Octokit = InstanceType < typeof Octokit > ;
You can’t perform that action at this time.
0 commit comments