forked from lucavallin/verto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
54 lines (48 loc) · 1.18 KB
/
types.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
// Nullable generic for nullable fields
type Nullable<T> = T | null;
// Describes a Tag, which is a programming language or a topic
export interface Tag {
display: Nullable<string>;
id: string;
}
// Describes a CountableTag, which is a Tag with a count
export interface CountableTag extends Tag {
count: number;
}
// Describes a Repository, which is a GitHub repository
export interface Repository {
description: Nullable<string>;
has_new_issues: boolean;
id: number;
issues: Issue[];
language: Tag;
last_modified: string;
license?: string;
name: string;
owner: string;
stars: number;
stars_display: string;
url: string;
topics?: Tag[];
}
// Describes an Issue, which is a GitHub issue linked to a repository
export interface Issue {
comments_count: number;
created_at: string;
id: number;
labels: Label[];
number: number;
title: string;
url: string;
}
// Describes a Label, which is a GitHub label
export interface Label {
id: string;
display: string;
}
// Describes the data that is retrieved from the GitHub API and used by the app
export interface AppData {
repositories: Repository[];
languages: CountableTag[];
topics: CountableTag[];
}