Repository navigation
Add main interface for library - #450
Conversation
|
@metcoder95 looks great and thanks for the PR 🎉 |
| export function config(options?: DotenvConfigOptions): DotenvConfigOutput; | ||
|
|
||
| /** dotenv library interface */ | ||
| export interface dotenv { |
There was a problem hiding this comment.
Can we export out this interface with the casing DotEnv? It would then match the casing of the other interface here.
There was a problem hiding this comment.
actually I think i am wrong about this let me download the code and get back to you.
There was a problem hiding this comment.
Ok pulled down, a saw the behavior of this. I think we should Pascal case the interfaces. I would love for the typing to work with.
import dotenv from 'dotenv'
dotenv.foo() // throws on compile.
dotenv.config() // works
I wish I was better at typescript and could add some code of how to do this, but sadly I am not quite sure how to get this to work.
jcblw
left a comment
There was a problem hiding this comment.
Can you just update the interface to be Pascal case and I think this is good to go.
|
Done! 👍 |
As requested in the following Issue: #448
The PR exports a main interface for the dotenv library.