Skip to content

Conversation

EndoHizumi
Copy link
Owner

Extract interfaces from index.ts into organized type definition files by domain, improving code modularity and maintainability. Clean up duplicate entries in tsconfig.json.

- Create organized type definition files in src/types/
- Separate interfaces by domain: config, scenario, resource, api
- Update index.ts to import interfaces from modular files
- Clean up tsconfig.json duplicate entries

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@EndoHizumi EndoHizumi requested a review from Copilot June 10, 2025 09:39
@EndoHizumi EndoHizumi self-assigned this Jun 10, 2025
Copy link

@Copilot 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 refactors type definitions by extracting interfaces from index.ts into domain-specific files and removing duplicate entries from tsconfig.json to improve modularity and maintainability.

  • Extracted scenario, resource, config, and API type definitions to separate files.
  • Organized type exports via index.ts to simplify module imports.

Reviewed Changes

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

Show a summary per file
File Description
src/types/scenario.ts New type definitions for various scenario-related objects
src/types/resource.ts Defined interfaces for image and sound resources
src/types/index.ts Aggregates exports from the type definition files
src/types/config.ts Introduces engine and scene configuration interfaces
src/types/api.ts Declares command list interface and related API types
Comments suppressed due to low confidence (3)

src/types/scenario.ts:14

  • The property 'get' in ScenarioObject might be too ambiguous given that it overlaps with HTTP methods and could be confused with accessor methods. Consider renaming it to something more descriptive such as 'httpGet'.
  get?: string;

src/types/resource.ts:2

  • The import path for SoundObject uses 'soundObject' which may be inconsistent with typical PascalCase naming conventions for files. Confirm that the file naming is intentional or update it to 'SoundObject' to match convention.
import { SoundObject } from '../resource/soundObject';

src/types/api.ts:26

  • Using the reserved word 'if' as a property name in the CommandList interface could be confusing. Consider renaming it (e.g., 'ifCommand' or 'conditional') to enhance clarity.
  if: (scenarioObject: IfHandlerScenario) => Promise<void>;

@EndoHizumi
Copy link
Owner Author

型定義が合っているのが、あやしくなってきたので、いちど、確認し直す。

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.

1 participant