GithubHelp home page GithubHelp logo

Comments (13)

ShukantPal avatar ShukantPal commented on June 17, 2024 1

@NintendoBen This will be fixed in the next release of pixi.js (pixijs/pixi.js). Each scoped @pixi/ package will ship with its own typings.

from tilemap.

ShukantPal avatar ShukantPal commented on June 17, 2024 1

@NintendoBen Here's the PR btw: pixijs/pixijs#6849

from tilemap.

ShukantPal avatar ShukantPal commented on June 17, 2024 1

Wait, the index.d.ts file isn't in the shipped npm package?

from tilemap.

ShukantPal avatar ShukantPal commented on June 17, 2024 1

@NintendoBen 2.1.3 was just released, can you try again?

from tilemap.

ben-zabloski avatar ben-zabloski commented on June 17, 2024

I think the problem I'm having is just the nature of TypeScript not working well with the existing pixi plugin architecture which benefits from JavaScript's flexibility. I'll probably just have to find a way to make TypeScript happy ๐Ÿ˜„

from tilemap.

ben-zabloski avatar ben-zabloski commented on June 17, 2024

As a temporary workaround, I created a copy of the pixi-tilemap.d.ts type definitions in my own source/types and retargeted the @pixi module imports to point at "pixi.js" instead and smoothed out a couple warnings here and there like changing "String" to "string", etc... So far things seem to be working ok!

from tilemap.

ben-zabloski avatar ben-zabloski commented on June 17, 2024

Thanks for the info @SukantPal ! ๐Ÿ˜

That will definitely solve the pixi type definition issue(s), but I think that the pixi-tilemap definitions will still be missing until they get bundled within the pixi-tilemap npm package root? Unless Iโ€™m missing something - I donโ€™t consider myself a TypeScript expert!

from tilemap.

ben-zabloski avatar ben-zabloski commented on June 17, 2024

Thatโ€™s right I believe ๐Ÿ˜…

from tilemap.

ShukantPal avatar ShukantPal commented on June 17, 2024

https://github.com/pixijs/pixi-tilemap/blob/master/index.d.ts

How could that be? @ivanpopelyshev ^^

from tilemap.

ShukantPal avatar ShukantPal commented on June 17, 2024

@NintendoBen Dod you figure out why the index.d.ts is missing?

from tilemap.

ben-zabloski avatar ben-zabloski commented on June 17, 2024

Iโ€™m not sure to be honest - just running npm install, it seems like the index.d.ts file doesnโ€™t exist in the node_modules/pixi-tilemap folder. Iโ€™m not that familiar with the npm package publish process, so Iโ€™m not sure what could be going wrong.

from tilemap.

ben-zabloski avatar ben-zabloski commented on June 17, 2024

Will do - Iโ€™ll try it shortly ๐Ÿ˜Š

from tilemap.

ben-zabloski avatar ben-zabloski commented on June 17, 2024

@SukantPal - looks like the index.d.ts file is included now! When I swap out my custom pixi-tilemap.d.ts definitions with the bundled pixi-tilemap/index.d.ts definitions, they're now picked up automatically by Visual Studio Code. The next trick will be to have the @pixi package typings generated and included ๐Ÿ˜„

Thanks for responding so quickly to this ๐Ÿ˜

from tilemap.

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.