Closed tustin2121 closed 3 years ago
I keep getting that error too. Its not really typescript's fault, just a type incompatibility between PIXI's default stage (PIXI.Container
) and the Stage
offered by pixi-layers.
Instead of commenting out something in a dependency (your change would be gone on next npm install
), you could add // @ts-ignore
one line before error (there would be a few more)
Oh, that's a new bug I have introduced :) gonna fix it
published 1.0.6 , plesae try again
That did indeed fix the problem. Thanks!
Instead of commenting out something in a dependency (your change would be gone on next
npm install
), you could add// @ts-ignore
one line before error (there would be a few more)
Oh I'm fully aware of how dependancies work. I'm not new to the NPM game, just TS specifically. And I was irritated that I would have had to put a @ts-ignore on like five consecutive lines because every time I added another Layer to the Stage, ts was throwing the error. (And it was nearly midnight and I was cranky, and I've already had quite a few more annoyances with ts than this.)
But anyway, thanks for the fast response.
I'm getting a lot of annoying TypeScript errors in my project when I attempt to use the @pixi/layers package with Pixi.js 6.0.4. This seems to be the root cause in https://github.com/pixijs/pixi-layers/blob/master/index.d.ts#L79
I'm unsure how to fix this problem as I'm new to TypeScript (and am ready to abandon it shortly with how much of a pain it's been over normal js so far, tbh...).
EDIT: Commenting out the line makes the error go away. I'm sure that's not how this is supposed to be fixed, but that's a workaround I guess for now...