24 lines
558 B
Markdown
24 lines
558 B
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [defaultWhen](./js-utils.defaultwhen.md)
|
||
|
|
||
|
## defaultWhen() function
|
||
|
|
||
|
<b>Signature:</b>
|
||
|
|
||
|
```typescript
|
||
|
export declare function defaultWhen<TVal>(condition: boolean, ...items: Array<TVal>): TVal;
|
||
|
```
|
||
|
|
||
|
## Parameters
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| condition | <code>boolean</code> | |
|
||
|
| items | <code>Array<TVal></code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`TVal`
|
||
|
|