Add import/export
This commit is contained in:
parent
02ecca7598
commit
667c490537
9 changed files with 2261 additions and 54 deletions
14
types.ts
14
types.ts
|
|
@ -167,6 +167,20 @@ export interface Player {
|
|||
}
|
||||
|
||||
// Network Types
|
||||
export interface ExportedQuiz {
|
||||
title: string;
|
||||
source: QuizSource;
|
||||
aiTopic?: string;
|
||||
config?: GameConfig;
|
||||
questions: Question[];
|
||||
}
|
||||
|
||||
export interface QuizExportFile {
|
||||
version: 1;
|
||||
exportedAt: string;
|
||||
quizzes: ExportedQuiz[];
|
||||
}
|
||||
|
||||
export type NetworkMessage =
|
||||
| { type: 'JOIN'; payload: { name: string; reconnect?: boolean; previousId?: string } }
|
||||
| { type: 'WELCOME'; payload: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue