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

Typescript Type Improvements #522

Merged
merged 7 commits into from
Aug 14, 2024
Merged

Typescript Type Improvements #522

merged 7 commits into from
Aug 14, 2024

Conversation

thejustinwalsh
Copy link

@thejustinwalsh thejustinwalsh commented Aug 8, 2024

Description of change

Refactor and improve Typescript types

Fixes:

  • refactor PixiReactNode & PixiElement and fixes a bug with children
  • draw prop is only available on Graphics
  • fixes leaked types from ContructorOverrides
  • adds some new utility types for readability
  • adds tests for JSX
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 Aug 8, 2024

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 26b969a:

Sandbox Source
pixi.js-sandbox Configuration

@thejustinwalsh thejustinwalsh marked this pull request as draft August 8, 2024 13:06
@thejustinwalsh
Copy link
Author

I think I broke the typescript type emitting when I attempted to fix the tests, My bad.
Working on an update now.

@thejustinwalsh thejustinwalsh marked this pull request as ready for review August 8, 2024 13:24
@thejustinwalsh thejustinwalsh marked this pull request as draft August 8, 2024 13:33
replace never with unknown for composition
@thejustinwalsh thejustinwalsh marked this pull request as ready for review August 8, 2024 13:58
@thejustinwalsh
Copy link
Author

Pulling https://pkg.csb.dev/pixijs/pixi-react/commit/26b969aa/@pixi/react into my local sandbox is working swimmingly!

For whatever reason, the CodeSanbox still tells me it can not find the types for the module!? 🤷

I'm pretty confident this is finally ready, but I could use your thoughts on the code sandbox issue.

@trezy trezy self-requested a review August 14, 2024 15:56
@trezy trezy added bug Something isn't working v8 Issues related to Pixi React v8 labels Aug 14, 2024
Copy link
Collaborator

@trezy trezy left a comment

Choose a reason for hiding this comment

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

LGTM!

@trezy trezy merged commit f5b5f81 into pixijs:beta Aug 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v8 Issues related to Pixi React v8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants