tryError Documentation

Function: createEnvConfig()
Function

```ts function createEnvConfig(configs): TryErrorConfig; ``` Defined in: [config.ts:852](https://github.com/oconnorjohnson/try-error/blob/e3ae0308069a4fba073f4543d527ad76373db795/src/config.ts#L852) Utility to create environment-aware configuration

tryError API Documentation v0.0.1-alpha.1


tryError API Documentation / createEnvConfig

Function: createEnvConfig()

function createEnvConfig(configs): TryErrorConfig;

Defined in: config.ts:852

Utility to create environment-aware configuration

Parameters

configs

development?

TryErrorConfig

production?

TryErrorConfig

test?

TryErrorConfig

Returns

TryErrorConfig

Example

configure(
  createEnvConfig({
    development: { captureStackTrace: true, developmentMode: true },
    production: { captureStackTrace: false, onError: sendToSentry },
    test: { captureStackTrace: true, developmentMode: true },
  })
);