Skip to content

Commit 3f57082

Browse files
authored
Merge pull request #915 from jedwards1211/patch-1
fix: make DotenvPopulateInput accept NodeJS.ProcessEnv type
2 parents ebcc9ff + d50f44d commit 3f57082

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

lib/main.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export interface DotenvPopulateOptions {
124124
}
125125

126126
export interface DotenvPopulateInput {
127-
[name: string]: string;
127+
[name: string]: string | undefined;
128128
}
129129

130130
/**

tests/types/test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ const dbHost: string = parsed["DB_HOST"];
1717

1818
const parsedFromBuffer = parse(Buffer.from("JUSTICE=league\n"));
1919
const justice: string = parsedFromBuffer["JUSTICE"];
20+
21+
config({
22+
// make sure the type accepts process.env (it didn't in the past)
23+
processEnv: process.env,
24+
});

0 commit comments

Comments
 (0)