@loopback/docs
Version:
Documentation for LoopBack 4
34 lines (21 loc) • 891 B
Markdown
---
lang: en
title: 'API docs: context.ispromiselike'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.context.ispromiselike.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [isPromiseLike](./context.ispromiselike.md)
## isPromiseLike() function
Check whether a value is a Promise-like instance. Recognizes both native promises and third-party promise libraries.
<b>Signature:</b>
```typescript
export declare function isPromiseLike<T>(value: T | PromiseLike<T> | undefined): value is PromiseLike<T>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| value | <code>T | PromiseLike<T> | undefined</code> | The value to check. |
<b>Returns:</b>
`value is PromiseLike<T>`