Skip to content
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

fix: Remove union types from ConstructorOptions #561

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

thejustinwalsh
Copy link
Collaborator

@thejustinwalsh thejustinwalsh commented Jan 4, 2025

Description of change

Container, Sprite and Graphics all have constructors that union the options with Texture | GraphicsContext | undefined, these types are not valid as props for a component, and the union was causing Omit and other utils to produce incorrect types when trying to extend the builtin types.

Excluding the unioned types from ConstructorOptions eleminates potential incorrect props and allows for Pick, Omit, etc to work as expected.

Fixes:

Pre-Merge Checklist
  • Tests and/or benchmarks are included
  • Documentation is changed or added
  • Lint process passed (npm run lint)
  • Tests passed (npm run test)

Copy link

codesandbox-ci bot commented Jan 4, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 814a351:

Sandbox Source
pixi.js-sandbox Configuration

@trezy trezy added this pull request to the merge queue Jan 4, 2025
Merged via the queue into beta with commit 68e1190 Jan 4, 2025
5 checks passed
@trezy trezy deleted the fix-constructor-options branch January 4, 2025 05:53
Copy link

github-actions bot commented Jan 4, 2025

🎉 This PR is included in version 8.0.0-beta.19 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants