You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.
@bluepichu I've never really used typescript before. Could you explain what's missing for me to run npm run build?
I'm currently getting a lot of errors like these:
pixi-multistyle-text.ts(3,37): error TS2503: Cannot find namespace 'PIXI'.
pixi-multistyle-text.ts(3,37): error TS4022: Extends clause of exported interface 'ExtendedTextStyle' has or is using private name 'PIXI'.
pixi-multistyle-text.ts(36,30): error TS2304: Cannot find name 'PIXI'.
pixi-multistyle-text.ts(36,30): error TS4020: Extends clause of exported class 'MultiStyleText' has or is using private name 'PIXI'.
pixi-multistyle-text.ts(49,4): error TS2322: Type '{ align: string; breakWords: boolean; dropShadow: boolean; dropShadowAngle: number; dropShadowBlu...' is not assignable to type 'ExtendedTextStyle'.
Object literal may only specify known properties, and 'align' does not exist in type 'ExtendedTextStyle'.
Also, we should add typescript as a dev dependency.
The text was updated successfully, but these errors were encountered:
Agreed regarding adding typescript as a dev dependency - I tend to forget about that since it's a global install.
Those errors look like you're missing the pixi.js type definitions, which likely means one of two things:
You need to run npm install to get the type definitions for Pixi, which get installed as @types/pixi.js.
You're using an older version of TypeScript (pre-2.0), which doesn't automatically import @types definitions. Updating to a newer version (I think the current one is 2.1.4) should fix the problem.
Thanks @bluepichu, my bad, forgot to install the types ^^ Still having these errors:
pixi-multistyle-text.ts(260,5): error TS2322: Type 'string | number' is not assignable to type 'string | CanvasGradient | CanvasPattern'.
Type 'number' is not assignable to type 'string | CanvasGradient | CanvasPattern'.
pixi-multistyle-text.ts(283,6): error TS2322: Type 'string | number' is not assignable to type 'string | CanvasGradient | CanvasPattern'.
Type 'number' is not assignable to type 'string | CanvasGradient | CanvasPattern'.
pixi-multistyle-text.ts(294,5): error TS2322: Type 'string | number | string[] | number[] | CanvasGradient | CanvasPattern' is not assignable to type 'string | CanvasGradient | CanvasPattern'.
Type 'number' is not assignable to type 'string | CanvasGradient | CanvasPattern'.
@bluepichu I've never really used typescript before. Could you explain what's missing for me to run
npm run build
?I'm currently getting a lot of errors like these:
Also, we should add
typescript
as a dev dependency.The text was updated successfully, but these errors were encountered: