@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
65 lines (34 loc) • 1.15 kB
Markdown
---
lang: en
title: 'API docs: context.ispromiselike'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context
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.
**Signature:**
```typescript
export declare function isPromiseLike<T>(value: T | PromiseLike<T> | undefined): value is PromiseLike<T>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
value
</td><td markdown="1">
T \| PromiseLike<T> \| undefined
</td><td markdown="1">
The value to check.
</td></tr>
</tbody></table>
**Returns:**
value is PromiseLike<T>