Skip to content

Commit

Permalink
Improve embedded jsdoc documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
motdotla committed Jan 15, 2022
1 parent 058936b commit 0601e23
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file. See [standa

TBD

## [12.0.2](https://github.com/motdotla/dotenv/compare/v12.0.1...v12.0.2) (2022-01-15)

### Changed

* Improve embedded jsdoc type documentation

## [12.0.1](https://github.com/motdotla/dotenv/compare/v12.0.0...v12.0.1) (2022-01-15)

### Changed
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -87,6 +87,7 @@ See [examples](https://github.com/dotenv-org/examples) of using dotenv with vari
* [esm](https://github.com/dotenv-org/examples/tree/master/dotenv-esm)
* [esm (preload)](https://github.com/dotenv-org/examples/tree/master/dotenv-esm-preload)
* [typescript](https://github.com/dotenv-org/examples/tree/master/dotenv-typescript)
* [typescript parse](https://github.com/dotenv-org/examples/tree/master/dotenv-typescript-parse)
* [webpack](https://github.com/dotenv-org/examples/tree/master/dotenv-webpack)
* [react](https://github.com/dotenv-org/examples/tree/master/dotenv-react)
* [react (typescript)](https://github.com/dotenv-org/examples/tree/master/dotenv-react-typescript)
Expand Down
14 changes: 7 additions & 7 deletions lib/main.d.ts
Expand Up @@ -13,11 +13,11 @@ export interface DotenvParseOutput {
}

/**
* Parses a string or buffer in the .env file format into an object.
* Parses a string or buffer in the .env file format into an object. {@link https://github.com/motdotla/dotenv#documentation documentation}
*
* @param src - contents to be parsed
* @param options - additional options
* @returns an object with keys and values based on `src`
* @param src - contents to be parsed. example: `'DB_HOST=localhost'`
* @param options - additional options. example: `{ debug: true }`
* @returns an object with keys and values based on `src`. example: `{ DB_HOST : 'localhost' }`
*/
export function parse<T extends DotenvParseOutput = DotenvParseOutput>(
src: string | Buffer,
Expand Down Expand Up @@ -47,11 +47,11 @@ export interface DotenvConfigOutput {
}

/**
* Loads `.env` file contents into {@link https://nodejs.org/api/process.html#process_process_env `process.env`}.
* Loads `.env` file contents into {@link https://nodejs.org/api/process.html#process_process_env process.env}. {@link https://github.com/motdotla/dotenv#documentation documentation}
* Example: 'KEY=value' becomes { parsed: { KEY: 'value' } }
*
* @param options - controls behavior
* @returns an object with a `parsed` key if successful or `error` key if an error occurred
* @param options - additional options. example: `{ path: './custom/path', encoding: 'latin1', debug: true }`
* @returns an object with a `parsed` key if successful or `error` key if an error occurred. example: { parsed: { KEY: 'value' } }
*
*/
export function config(options?: DotenvConfigOptions): DotenvConfigOutput;
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "dotenv",
"version": "12.0.1",
"version": "12.0.2",
"description": "Loads environment variables from .env file",
"main": "lib/main.js",
"types": "lib/main.d.ts",
Expand Down

0 comments on commit 0601e23

Please sign in to comment.