Giter Site home page Giter Site logo

Comments (7)

af avatar af commented on July 23, 2024

Hi, I'm not super familiar with Typescript (the envalid definitions are the work of several other contributors). What's the benefit to having the definitions in that repo, rather than here?

from envalid.

sjmcdowall avatar sjmcdowall commented on July 23, 2024

@af -- Basically it's sort of now standard for TS programmers -- when they import a new module to try to do a

yarn add --dev @types/module

to bring in the TS definition file.. it's second nature and if you look at the @types repo there are 1000's of TS definition files there from all sorts of things.

Having it here means someone needs to find it -- and then add it to their actual source tree somewhere and point tsconfig to it .. and .. not just have it in the devDependencies (where it's needed).

So I really think having envalid make a @types/envalid contribution would be great. I could give it a whirl (never added anything to @types myself) if that's ok?

from envalid.

af avatar af commented on July 23, 2024

Sure go for it! If it makes it easier for people to use the library, sounds great to me.

It seems strange to me that Typescript wouldn't also look in the package's repo for type definitions, though 🤷‍♂️

from envalid.

sjmcdowall avatar sjmcdowall commented on July 23, 2024

I was just thinking the same thing actually .. I'm going to explore that and maybe my lack of TS knowledge has me doing something wrong in my tscofnig! :)

from envalid.

af avatar af commented on July 23, 2024

👍 Closing this and looking forward to seeing the definitions added to @types

from envalid.

sjmcdowall avatar sjmcdowall commented on July 23, 2024

Your going to be disappointed because -- after some digging and checking -- it's not needed -- tslint does indeed (with a proper config) look at the node module for adefinition .. doh! Sooooo .. Nevermind ... nothing to see here.. move along :)

from envalid.

af avatar af commented on July 23, 2024

Oh great, thanks for looking into that, it's good to know 👍

from envalid.

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.