mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
refactor: move interfaces to types.ts
This commit is contained in:
1 parent
7f33100132
commit
bb2a1a145f
3 files changed
+18
-15
No files matched your search
@@ -7,6 +7,7 @@ import api from '../utils/api'
|
||||
import Socket from '../utils/socket'
|
||||
import SocketTerminal from '../utils/terminal'
|
||||
import { LoadQuestError, LoadSessionError } from '../utils/errors'
|
||||
import { Session } from '../types'
|
||||
|
||||
const toast = useToast()
|
||||
|
||||
@@ -26,21 +27,13 @@ function newSession() {
|
||||
}
|
||||
}
|
||||
|
||||
interface Session {
|
||||
status: string
|
||||
graph: FileGraph
|
||||
pwd: string
|
||||
hints: string[]
|
||||
tasks: string[]
|
||||
}
|
||||
|
||||
interface Store {
|
||||
session: Session
|
||||
questId: string
|
||||
quest: IQuest | null
|
||||
}
|
||||
|
||||
const store: Store = reactive({
|
||||
const store = reactive<Store>({
|
||||
session: newSession(),
|
||||
questId: '',
|
||||
quest: null,
|
||||
|
||||
Reference in new issue
Block a user