Skip to content

TypeScript - Dependency Injection Type #448

Closed

Description

@Dylan-Israel

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) {}

Activity

  1. jcblw commented on Jan 13, 2020

    @jcblw
    Contributor

    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

  2. motdotla commented on May 5, 2021

    @motdotla
    Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions