Say that I want to use dotenv
module in my TypeScript project and install its .d.ts using npm install @types/dotenv --save
. Then I realize that the types are not correct. For example, the config()
function doesn't return boolean but a richer object.
How do I deal with this situation? Should I just copy the downloaded type definition to another file, update it manually and uninstall @types/dotenv? Is there a better way? (I need the fix right away, not after it has been merged by upstream maintainers.)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…