-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.d.ts
47 lines (42 loc) · 1.31 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// This should not be necssary :( But without the explict type definitions
// `@octoherd/octokit` exports the Class type instead of the instance type,
// and using "InstanceType<import('@octoherd/octokit').Octokit>" does not
// include the types from the plugins (octokit.paginate)
//
// The code is based on the generated type definitions from @octokit/rest:
// https://unpkg.com/browse/@octokit/rest/dist-types/index.d.ts
import { Octokit as Core } from "@octokit/core";
interface octoherdLog {
(
meta: Record<string, unknown>,
message?: string,
...interpolations: string[]
): void;
(message: string, ...interpolations: string[]): void;
}
interface octoherdLogSetContext {
(meta: Record<string, unknown>): void;
}
export declare const Octokit: (new (...args: any[]) => {
[x: string]: any;
}) & {
new (...args: any[]): {
[x: string]: any;
};
plugins: any[];
} & typeof Core &
import("@octokit/core/types").Constructor<
void & {
paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
} & {
log: {
debug: octoherdLog;
info: octoherdLog;
warn: octoherdLog;
error: octoherdLog;
setContext: octoherdLogSetContext;
};
}
>;
export declare type Octokit = InstanceType<typeof Octokit>;
export declare type VERSION = string;