forked from share121/inter-knot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.d.ts
87 lines (83 loc) · 1.95 KB
/
env.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// export declare global {
// function run();
// function getAccessToken(code: string): Promise<{
// response: {
// access_token: string;
// expires_in: number;
// refresh_token: string;
// refresh_token_expires_in: number;
// scope: "";
// token_type: "bearer";
// };
// }>;
// function refreshAccessToken(refresh_token: string): Promise<{
// response: {
// access_token: string;
// expires_in: number;
// refresh_token: string;
// refresh_token_expires_in: number;
// scope: "";
// token_type: "bearer";
// };
// }>;
// function getUserInfo(access_token: string): Promise<{
// data: {
// viewer: {
// login: string;
// avatarUrl: string;
// repositories: {
// totalCount: number;
// };
// };
// };
// }>;
// function getDiscussions(access_token: string): Promise<{
// data: {
// repository: {
// discussions: {
// nodes: {
// author: {
// avatarUrl: string;
// login: string;
// url: string;
// };
// bodyHTML: string;
// bodyText: string;
// title: string;
// url: string;
// comments: {
// nodes: {
// author: {
// avatarUrl: string;
// login: string;
// url: string;
// };
// bodyHTML: string;
// }[];
// };
// }[];
// };
// };
// };
// }>;
// }
declare module "*?url";
interface Actor {
avatarUrl: string;
login: string;
url: string;
repositoriesCount: number | undefined;
}
interface Article {
title: string;
url: string;
author: Actor;
bodyHTML: string;
bodyText: string;
cover: string;
comments: MyComment[];
}
interface MyComment {
author: Actor;
bodyHTML: string;
}