Open marigarey opened 2 months ago
it probably just hasnt been added to the types file. dotenv has never been a typescript project. you can either define your own type in your project for it or if you have time a PR contribution to add it to the project's type file would be very welcome :)
i've been using javascript, but I can try to look through the code and see how to fix it!
(also thank you for your dotenv work! your work makes my life so much easier!!)
Hi, I am a programmer trying to get into open-source contribution and wanted to chime in here. It seems like populate is already defined in the lib/main.d.ts types file:
/**
* Loads `source` json contents into `target` like process.env.
*
* See https://dotenvx.com/docs
*
* @param processEnv - the target JSON object. in most cases use process.env but you can also pass your own JSON object
* @param parsed - the source JSON object
* @param options - additional options. example: `{ debug: true, override: false }`
* @returns {void}
*
*/
export function populate(processEnv: DotenvPopulateInput, parsed: DotenvPopulateInput, options?: DotenvConfigOptions): void;
Not sure if I'm looking in the right place, maybe it's a config issue on the user's end?
When I use the populate function, my code returns the error: "TypeError: dotenv.populate is not a function".
My code:
Not sure what is wrong, hopefully its on my end!