Skip to content

Conversation

@kharus
Copy link
Contributor

@kharus kharus commented Mar 18, 2025

No description provided.

@kharus kharus requested a review from Copilot March 18, 2025 04:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds explicit type definitions for the Interview view model and refines the component prop types to improve type safety and clarity in interview-related functionality.

  • Introduces InterviewViewModel and InterviewNodeViewModel interfaces in src/model/Interview.ts.
  • Adds LabelViewModel interface and updates the encodePrePostArgo function in src/model/Item.ts.
  • Updates QuestionBase.vue to use the new InterviewViewModel interface and adds TypeScript annotations.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/model/Interview.ts Added InterviewViewModel and InterviewNodeViewModel interfaces; updated encodeJsonQ function.
src/model/Item.ts Introduced LabelViewModel interface and updated the encodePrePostArgo return type.
src/components/QuestionBase.vue Updated prop types to use InterviewViewModel and added TypeScript types to the component.
Comments suppressed due to low confidence (2)

src/model/Interview.ts:54

  • The returned object of encodeJsonQ is missing the 'mark' property required by the InterviewViewModel interface. Consider adding the 'mark' field (e.g., mark: q.mark or a default value) to satisfy the interface.
prePost: encodePrePostArgo(q.prePost),

src/model/Interview.ts:55

  • The parameter 'children' used in the call to encodeAndOrArgo is not defined; it likely should be replaced with a reference like q.children or another valid source.
andOr: encodeAndOrArgo(q.andOr, children)

@kharus kharus merged commit d5b59ee into main Mar 18, 2025
1 check passed
@kharus kharus deleted the typed-QuestionBase-props branch March 18, 2025 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants