Skip to content

Revert recent types #7601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged

Revert recent types #7601

merged 1 commit into from
Apr 24, 2025

Conversation

slimbuck
Copy link
Member

Revert the types change in #7579

@slimbuck slimbuck requested review from a team and Copilot April 24, 2025 14:42
@slimbuck slimbuck self-assigned this Apr 24, 2025
Copy link
Contributor

@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

The PR reverts a recent change in texture type annotations by updating their JSDoc comments.

  • Reverts the JSDoc type specification in the setter from a union of TEXTURETYPE constants to a generic string.
  • Reverts the JSDoc type specification in the getter from a union of TEXTURETYPE constants to a generic string.
Comments suppressed due to low confidence (1)

src/platform/graphics/texture.js:821

  • The change in the getter’s JSDoc type annotation to {string} may lead to a loss of descriptive type constraints. Please ensure that this generic type meets all usage requirements or document the change accordingly.
* @type {string}
@@ -803,7 +803,7 @@ class Texture {
/**
* Sets the texture type.
*
* @type {TEXTURETYPE_DEFAULT|TEXTURETYPE_RGBM|TEXTURETYPE_RGBE|TEXTURETYPE_RGBP}
* @type {string}
Copy link
Preview

Copilot AI Apr 24, 2025

Choose a reason for hiding this comment

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

Reverting the JSDoc type annotation to {string} removes the explicit union of allowed texture types, potentially reducing clarity for developers. Consider including a comment explaining the rationale behind this change.

Suggested change
* @type {string}
* @type {'default' | 'rgbm' | 'rgbe' | 'rgbp'}

Copilot uses AI. Check for mistakes.

@slimbuck slimbuck merged commit 38aa8c2 into playcanvas:main Apr 24, 2025
7 checks passed
@slimbuck slimbuck deleted the notype branch April 24, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants