UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

35 lines (22 loc) 986 B
--- 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) &gt; [@loopback/context](./context.md) &gt; [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 | T \| PromiseLike&lt;T&gt; \| undefined | The value to check. | <b>Returns:</b> value is PromiseLike&lt;T&gt;