---
editUrl: false
next: false
prev: false
title: "single"
---

> **single**\<`T`\>(`cb`): () => `T`

@__PURE__

## Type parameters

• **T**

## Parameters

• **cb**

## Returns

`Function`

### Returns

`T`

## Since

2.0.0.
Creates a singleton object.

## Source

[src/core/ioc/dependency-injection.ts:11](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/ioc/dependency-injection.ts#L11)
