## singleton() function

**Signature:**

```typescript
export declare function singleton(collection: TypedValue[], type?: string): TypedValue | undefined;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| collection | [TypedValue](/content/docs/sdk/core.typedvalue) |  |
| type | string | _(Optional)_ |

**Returns:**

[TypedValue](/content/docs/sdk/core.typedvalue) | undefined

- [singleton() function](/content/docs/sdk/core.singleton#singleton-function/index.html)
- [Parameters](/content/docs/sdk/core.singleton#parameters/index.html)
