Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript - Dependency Injection Type #448

Closed
Dylan-Israel opened this issue Jan 8, 2020 · 2 comments
Closed

TypeScript - Dependency Injection Type #448

Dylan-Israel opened this issue Jan 8, 2020 · 2 comments

Comments

@Dylan-Israel
Copy link

Objective: have a type for the full dotenv package when being used during dependency injection. Example is from a nestjs/node project.

Current Workaround:

constructor(private dotenvModule: typeof dotenv = dotenv) {}

Preferred:
consructor(private dotenvModule: dotenv) {}

@jcblw
Copy link
Collaborator

jcblw commented Jan 13, 2020

Open to a PR for this, seems like it would only be making a interface for the dotenv that includes: load, config, and parse function types. Here is the type definitions

@motdotla
Copy link
Owner

motdotla commented May 5, 2021

We will come back to this soon. Moved here: #518

@motdotla motdotla closed this as completed May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants