Skip to content

Commit

Permalink
Merge pull request #531 from ericmorand/issue_530
Browse files Browse the repository at this point in the history
Issue #530 - Typings: add generic support to parse function
  • Loading branch information
motdotla authored May 19, 2021
2 parents 8dc2e71 + 5596a79 commit a558363
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export interface DotenvParseOutput {
* @param options - additional options
* @returns an object with keys and values based on `src`
*/
export function parse(
export function parse<T extends DotenvParseOutput = DotenvParseOutput>(
src: string | Buffer,
options?: DotenvParseOptions
): DotenvParseOutput;
): T;

export interface DotenvConfigOptions {
/**
Expand Down

0 comments on commit a558363

Please sign in to comment.