Comments (7)
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.
@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.
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.
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.
👍 Closing this and looking forward to seeing the definitions added to @types
from envalid.
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.
Oh great, thanks for looking into that, it's good to know 👍
from envalid.
Related Issues (20)
- Add parse options to str() HOT 1
- array validator HOT 1
- 7.3.0 breaking change? HOT 11
- Add option to load validator specs from .example.env file HOT 1
- Access value of env object by name HOT 1
- envalid in react-native for preview crashes without giving description of missing env HOT 2
- testOnly setting variable to Symbol instead of failing HOT 5
- Pick from validators HOT 2
- str({ devDefault: undefined }) generates an incorrect type HOT 2
- Require environment variables only if `NODE_ENV` is not set to `test` HOT 2
- Skipping env var validation in tests HOT 1
- Prevent process exit during tests HOT 1
- makeExactValidator is not exported HOT 1
- Combine envalid with Docker secrets
- Issue with envalid in test. HOT 1
- Typescript, typing the environment variables returns never HOT 1
- Waiting for an async reporter callback HOT 3
- How to see description and help for optional env? HOT 4
- Add a warn option
- devDefault does not work when NODE_ENV is undefined HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from envalid.