Giter Site home page Giter Site logo

Typescript about react-lru HOT 3 CLOSED

zekedroid avatar zekedroid commented on July 1, 2024
Typescript

from react-lru.

Comments (3)

zekedroid avatar zekedroid commented on July 1, 2024

Probably not, the library is stable and does what it's meant to do. But thanks for suggesting! Out of curiosity, what would be the upside, in your opinion, to adding TypeScript to this particular library?

from react-lru.

WorldMaker avatar WorldMaker commented on July 1, 2024

Typescript definitions make it faster to get started with a new-to-you library by providing autocomplete hints and other useful information. (Even for strictly JS only projects, some code editors/IDEs such as VSCode will use any extra Typescript information they have available to provide a better coding experience.) While the Typescript community has another major avenue for finding and installing type definition files, the best experience is always when npm install of the package itself includes all of it's type information. Of course it's an API surface to maintain, and I realize not every project wants to maintain that, which is why I ask first rather than PR first. There's an eclectic mix of projects on npm and I realize not everyone wants to care about Typescript. I'm happy to help maintain the definition files over time after I help contribute them, of course, and even help with any interest in converting a project to Typescript (which can be a good way to get some additional testing and basic safety checks in a library). Typescript is sometimes useful as a simpler "downleveler" for JS features than Babel, too, and I think that's useful to some projects.

Personally, I don't write JS without Typescript, and I think it's great for any size project of any stability/maintenance level, but I realize it's not always to everyone's taste.

from react-lru.

zekedroid avatar zekedroid commented on July 1, 2024

Ah yes. While not something I personally would add to this project, I think TS definitions could help like you mention. It's not entirely clear to me what the added complexities of the project setup will be so I'd be open to reviewing a PR showing how it would work, granted this library continued to work as expected and with no added runtime dependencies needed.

from react-lru.

Related Issues (4)

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.