Giter Site home page Giter Site logo

Comments (3)

bluepichu avatar bluepichu commented on August 22, 2024

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.

Let me know if neither of those work.

from pixi-multistyle-text.

tleunen avatar tleunen commented on August 22, 2024

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'.

from pixi-multistyle-text.

bluepichu avatar bluepichu commented on August 22, 2024

#14 should fix these.

from pixi-multistyle-text.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.