Skip to content

Commit

Permalink
move types
Browse files Browse the repository at this point in the history
  • Loading branch information
nella17 committed Jan 22, 2023
1 parent 9e4f210 commit 9d67416
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 60 deletions.
60 changes: 1 addition & 59 deletions src/composables/data.ts
Original file line number Diff line number Diff line change
@@ -1,62 +1,4 @@
interface Dep {
label: string
value: string
children?: Dep[]
}

type DepPath = Dep[]

interface Course {
GroupName: string
GroupName_E: string
TURL: string
URL: string
acy: string
blocked: string
brief: string
brief_E: string
category_cname: any
category_ename: any
category_type: any
cos_cname: string
cos_credit: string
cos_ename: string
cos_hours: string
cos_id: string
cos_practice_hours: string
cos_teaching_hours: string
cos_time: string
cos_type_code: string
crsoutline: string
degree: string
dep_id: string
fifth_wish_reserved_num: string
first_wish_reserved_num: string
fourth_wish_reserved_num: string
lecturers: string
lecturers_E: string
master_dep_cname: string
master_dep_ename: string
memo: string
num_limit: string
priority: string
registered_num: string
reserved_num: string
sFlag: any
second_wish_reserved_num: string
sem: string
student_id: any
student_wtype: any
third_wish_reserved_num: string
wType: string
wType_cname: string
wType_ename: string
}

interface CourseWrap {
course: Course
dep_uid: string
}
import { Dep, DepPath, Course, CourseWrap } from '@/types'

export const useDataStore = defineStore('data', () => {
let token = ''
Expand Down
59 changes: 59 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
export interface Dep {
label: string
value: string
children?: Dep[]
}

export type DepPath = Dep[]

export interface Course {
GroupName: string
GroupName_E: string
TURL: string
URL: string
acy: string
blocked: string
brief: string
brief_E: string
category_cname: any
category_ename: any
category_type: any
cos_cname: string
cos_credit: string
cos_ename: string
cos_hours: string
cos_id: string
cos_practice_hours: string
cos_teaching_hours: string
cos_time: string
cos_type_code: string
crsoutline: string
degree: string
dep_id: string
fifth_wish_reserved_num: string
first_wish_reserved_num: string
fourth_wish_reserved_num: string
lecturers: string
lecturers_E: string
master_dep_cname: string
master_dep_ename: string
memo: string
num_limit: string
priority: string
registered_num: string
reserved_num: string
sFlag: any
second_wish_reserved_num: string
sem: string
student_id: any
student_wtype: any
third_wish_reserved_num: string
wType: string
wType_cname: string
wType_ename: string
}

export interface CourseWrap {
course: Course
dep_uid: string
}
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"types": ["@types/chrome", "vite/client"],
"importHelpers": true,
"removeComments": true,
"forceConsistentCasingInFileNames": true,
Expand Down

0 comments on commit 9d67416

Please sign in to comment.