Skip to content

Comments

Sprite.hitAreaの型のanyを排除#258

Merged
ienaga merged 6 commits intomainfrom
develop
Feb 17, 2026
Merged

Sprite.hitAreaの型のanyを排除#258
ienaga merged 6 commits intomainfrom
develop

Conversation

@ienaga
Copy link
Member

@ienaga ienaga commented Feb 17, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 17, 2026 12:49
Copy link
Contributor

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 removes the any usage from the public Sprite.hitArea type to make the API more strictly typed, and bumps the player/package version accordingly.

Changes:

  • Update Sprite.hitArea from ISprite<any> | null to ISprite<Sprite> | null
  • Bump player/package version 3.0.33.0.4
  • Update dev dependency versions (TypeScript ESLint + jsdom) and refresh package-lock.json

Reviewed changes

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

File Description
src/index.ts Updates the console banner to show version 3.0.4.
packages/display/src/Sprite.ts Tightens hitArea typing to remove any.
package.json Bumps package version and updates dev dependency ranges.
package-lock.json Syncs lockfile with updated dependencies and version bump.

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

@@ -55,7 +55,7 @@ export class Sprite extends DisplayObjectContainer
* @type {Sprite|null}
* @private
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

hitArea is declared as public, but its JSDoc still marks it as @private. Since this property is part of the documented Sprite API (see specs) and is publicly accessible, the @private tag is misleading; update the JSDoc to @public (or make the field actually private if that was intended).

Suggested change
* @private
* @public

Copilot uses AI. Check for mistakes.
{
"name": "@next2d/player",
"version": "3.0.3",
"version": "3.0.4",
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

This release bumps the package version from 3.0.3 to 3.0.4, but it also tightens the public TypeScript type of Sprite.hitArea (from any to Sprite). If you’re following semver for type definitions, consider whether a patch bump is sufficient or whether this should be documented as a breaking change for TS consumers (or bumped as a minor version).

Suggested change
"version": "3.0.4",
"version": "3.1.0",

Copilot uses AI. Check for mistakes.
@ienaga ienaga merged commit fbcec6b into main Feb 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant