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

TS 4.2.3 and PIXI.js 6.0.2 throws TS error #210

Closed
kresli opened this issue May 1, 2021 · 7 comments
Closed

TS 4.2.3 and PIXI.js 6.0.2 throws TS error #210

kresli opened this issue May 1, 2021 · 7 comments

Comments

@kresli
Copy link

kresli commented May 1, 2021

image

Additional info

  • react-pixi-fiber version: 0.14.2
  • React version: 17.0.2
  • ReactDOM version: 17.0.2
  • PixiJS version: 6.0.2
  • @types/react: 17.0.4
@kresli
Copy link
Author

kresli commented May 1, 2021

seems like all the props are expected as ((event: InteractionEvent) => void) | undefined

@kresli
Copy link
Author

kresli commented May 1, 2021

here is the line causing the issue

type PixiElement<Props> = Props & React.ClassAttributes<Props> & InteractiveComponent;

What's the purpose of InteractionEvent type?

@michalochman
Copy link
Owner

Hi @kresli, thanks for reporting. The purpose of this type is to support props like pointerdown or mouseup, etc. when display object has interactive set to true, see ClickExample/index.js.

Do you know the last version of TypeScript and PixiJS that worked correctly for you?

@michalochman
Copy link
Owner

I have narrowed down the issue to InteractionEventTypes being removed in PixiJS v6. We will either need to hardcode the list of events to work as props or find another way to support them.

@michalochman
Copy link
Owner

@kresli I fixed it in [email protected]

@kresli
Copy link
Author

kresli commented May 4, 2021

I can confirm it has been fixed in beta.9

Thank you

@michalochman
Copy link
Owner

[email protected] released.

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

No branches or pull requests

2 participants