Skip to content

Commit a558363

Browse files
authored
Merge pull request #531 from ericmorand/issue_530
Issue #530 - Typings: add generic support to parse function
2 parents 8dc2e71 + 5596a79 commit a558363

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ export interface DotenvParseOutput {
1919
* @param options - additional options
2020
* @returns an object with keys and values based on `src`
2121
*/
22-
export function parse(
22+
export function parse<T extends DotenvParseOutput = DotenvParseOutput>(
2323
src: string | Buffer,
2424
options?: DotenvParseOptions
25-
): DotenvParseOutput;
25+
): T;
2626

2727
export interface DotenvConfigOptions {
2828
/**

0 commit comments

Comments
 (0)