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

Update typescript definition #40

Closed
ArtemFrantsiian opened this issue Sep 6, 2018 · 1 comment
Closed

Update typescript definition #40

ArtemFrantsiian opened this issue Sep 6, 2018 · 1 comment

Comments

@ArtemFrantsiian
Copy link

ArtemFrantsiian commented Sep 6, 2018

Description

In this example you show how work with interactive click. But if you try to do this in typescript you get an error about pointerdown and anchor. So I think that just need add pointerdown to index.d.ts for Sprite and change anchor to take number[], because when I've done this all worked.
And please add into documentation the section how works with different events in React style (mouseover, click, drag'n'drop, etc..)

Steps to reproduce

<Sprite
  texture={texture}
  x={25}
  y={680}
  interactive={true}
  pointerdown={this._onClick}
 >
    <Text text="CLICK"/>
</Sprite>

Give an error:
Property 'pointerdown' does not exist on type 'IntrinsicAttributes & SpriteProperties & { children?: ReactNode; }'

Additional info

screenshot from 2018-09-06 10-33-10

@inlet
Copy link
Collaborator

inlet commented Sep 13, 2018

I'm currently rewriting the complete definition file as it was quite a mess. 😉

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