ibm-cloud-sdk-core
Version:
Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.
56 lines (27 loc) • 848 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [onlyOne](./ibm-cloud-sdk-core.onlyone.md)
## onlyOne() function
Checks that exactly one of the arguments provided is defined. Returns true if one argument is defined. Returns false if no argument are defined or if 2 or more are defined.
**Signature:**
```typescript
export declare function onlyOne(...args: any): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
args
</td><td>
any
</td><td>
The spread of arguments to check
</td></tr>
</tbody></table>
**Returns:**
boolean
true if and only if exactly one argument is defined