pixi-react icon indicating copy to clipboard operation
pixi-react copied to clipboard

Bug: Property 'geometry' does not exist on type Graphics

Open Carter-Sondrol opened this issue 2 years ago • 1 comments
trafficstars

Current Behavior

It seems the typescript defninitions for @pixi/react Graphics doesn't correctly contain the geometry property

Expected Behavior

The geometry property (and any others that might be missing) should be valid on the JSX component

Steps to Reproduce

Typescript flags <Graphics x={0} y={0} geometry={rect.current} /> as

Property 'geometry' does not exist on type 'IntrinsicAttributes & Partial<Omit<Graphics, P | ReadonlyKeys<Graphics> | "draw"> & WithPointLike<P>> & { ...; } & InteractionEvents & { ...; }'.

Environment

  • @pixi/react version: e.g. 7.0.0
  • pixi.js version: e.g. 7.1.0
  • React version: e.g. 18.0.0
  • ReactDOM version: e.g. 18.0.0
  • Browser & Version: e.g. Chrome 108
  • OS & Version: e.g. Ubuntu 22.04
  • Running Example: e.g. https://pixiplayground.com/

Possible Solution

I believe the type definitions just need to be updated

Additional Information

No response

Carter-Sondrol avatar Jun 22 '23 20:06 Carter-Sondrol

Same for SimpleRope and SimpleMesh. No points argument. And also not accepting textureScale besides typization (points atleast works with ts-nocheck)

alexcupertme avatar Aug 16 '23 07:08 alexcupertme