Skip to content

Commit e0e22b8

Browse files
committed
export type
1 parent 905597b commit e0e22b8

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

web_src/js/components/ContextPopup.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import {SvgIcon} from '../svg.ts';
33
import {GET} from '../modules/fetch.ts';
44
import {computed, onMounted, ref} from 'vue';
5+
import type {Issue} from '../types';
56
67
const {appSubUrl, i18n} = window.config;
78
@@ -20,8 +21,6 @@ const body = computed(() => {
2021
return body;
2122
});
2223
23-
type Issue = {id: number; title: string; state: 'open' | 'closed'; pull_request?: {draft: boolean; merged: boolean}};
24-
2524
function getIssueIcon(issue: Issue) {
2625
if (issue.pull_request) {
2726
if (issue.state === 'open') {

web_src/js/types.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,13 @@ export type IssueData = {
3636
type: string,
3737
index: string,
3838
}
39+
40+
export type Issue = {
41+
id: number;
42+
title: string;
43+
state: 'open' | 'closed';
44+
pull_request?: {
45+
draft: boolean;
46+
merged: boolean;
47+
};
48+
};

0 commit comments

Comments
 (0)