Skip to content

Conversation

@seijikohara
Copy link
Owner

Summary

This PR changes Props definitions from interface to type alias to align with Vue ecosystem best practices.

Changes

  • Change export interface Props to export type Props = { in:
    • src/components/JsonTreeView.vue
    • src/components/JsonTreeViewItem.vue

Rationale

Type aliases are the recommended approach for Vue props definitions according to Vue's official documentation and the broader Vue community. The main advantages are:

  1. Flexibility: Type aliases support union and intersection types more naturally
  2. Convention: Most Vue codebases and examples use type for props
  3. Consistency: Aligns with other type definitions in the codebase (e.g., ColorScheme, ItemData)

This addresses feedback from GitHub Copilot's automated review on PR #517.

Testing

  • Type checking passes
  • No functional changes - this is purely a type definition syntax update
  • Build and tests pass successfully

Use `type` instead of `interface` for Props definitions to align with Vue ecosystem best practices. Type aliases are more flexible for union and intersection types, which is the recommended approach in Vue's official documentation and the broader Vue community.

This addresses feedback from GitHub Copilot review on PR #517.
Copilot AI review requested due to automatic review settings November 21, 2025 17:23
@seijikohara seijikohara enabled auto-merge (squash) November 21, 2025 17:23
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 PR updates Props definitions from interface to type alias syntax across Vue components to align with Vue ecosystem best practices and improve type system flexibility.

Key Changes:

  • Converted export interface Props to export type Props = { in two Vue component files
  • Maintains identical type structure while adopting the more conventional TypeScript syntax for Vue props

Reviewed changes

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

File Description
src/components/JsonTreeViewItem.vue Changed Props definition from interface to type alias
src/components/JsonTreeView.vue Changed Props definition from interface to type alias

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@seijikohara seijikohara merged commit a3bc315 into main Nov 21, 2025
13 checks passed
@seijikohara seijikohara deleted the fix/use-type-for-props-definition branch November 21, 2025 17:24
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