> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nanoforge.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Default function

> Property decorator that supplies a fallback value when the environment variable is undefined or null.

import { PageLink } from '/snippets/tsdocs/PageLink.jsx';
import { RefLink } from '/snippets/tsdocs/RefLink.jsx';

# Default

## Summary

Property decorator that supplies a fallback value when the environment variable is `undefined` or `null`.

## Signature

```typescript theme={null}
declare function Default(defaultValue: unknown): PropertyDecorator;
```

## Parameters

### defaultValue

**Type**:`unknown`

The value to use when the property is absent.

## Returns

**Type**:`PropertyDecorator`

Property decorator that supplies a fallback value when the environment variable is or .

## Remarks

Pairs with `class-transformer`'s `@Expose` and `class-validator` decorators. The default is deep-cloned via `JSON.parse(JSON.stringify(…))` so objects are not shared between instances.

## Examples

### Example 1

```typescript theme={null}
```
