Skip to content

Conversation

@kharus
Copy link
Contributor

@kharus kharus commented Mar 14, 2025

No description provided.

@kharus kharus requested a review from Copilot March 14, 2025 05:28
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 refactors the representation of the AndOr type from a class-based hierarchy to a discriminated union, simplifying type management and JSON encoding.

  • Removed the And, Or, and Simply classes and replaced them with a union type.
  • Updated the encodeJsonQ function and relevant test cases to work with the new union representation.
  • Adjusted related functions in Relevance.ts to construct AndOr objects using the new union type.

Reviewed Changes

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

File Description
src/model/Interview.ts Replaced class-based AndOr with a discriminated union and updated the JSON encoding logic.
src/model/tests/Interview.test.ts Updated test cases to construct AndOr objects as union literals.
src/model/Relevance.ts Modified object construction to use the new AndOr union type.

@kharus kharus merged commit a41651a into main Mar 14, 2025
1 check passed
@kharus kharus deleted the andor-to-disc-union branch March 14, 2025 05:29
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