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

# promiseTimeout

> Function promiseTimeout in the Baileys API.

> **promiseTimeout**\<`T`>(`ms`, `promise`): `Promise`\<`T`>

Defined in: [src/Utils/generics.ts:151](https://github.com/WhiskeySockets/Baileys/blob/master/src/Utils/generics.ts#L151)

## Type Parameters

• **T**

## Parameters

### ms

`undefined` | `number`

### promise

(`resolve`, `reject`) => `void`

## Returns

`Promise`\<`T`>
