From ad17e669c5781dad65d1a2e35444cea15e514e26 Mon Sep 17 00:00:00 2001 From: Leung Cheng Date: Wed, 5 Jun 2024 18:03:34 +0800 Subject: [PATCH] Remove readonly modifiers --- src/model/question_set.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/model/question_set.ts b/src/model/question_set.ts index f9464dd..f977e1c 100644 --- a/src/model/question_set.ts +++ b/src/model/question_set.ts @@ -1,19 +1,13 @@ import { MultipleChoiceBuilder, MultipleChoice } from './mc' import { v4 as uuidv4 } from 'uuid' export class QuestionSet { - readonly name: string + name: string - readonly questions: ReadonlyArray + questions: Question[] readonly id: string - static create({ - name, - questions, - }: { - name: string - questions: ReadonlyArray - }) { + static create({ name, questions }: { name: string; questions: Question[] }) { const id = uuidv4() return new QuestionSet({ id, name, questions }) } @@ -25,7 +19,7 @@ export class QuestionSet { }: { id: string name: string - questions: ReadonlyArray + questions: Question[] }) { this.id = id this.name = name