UNPKG

@loopback/docs

Version:
34 lines (21 loc) 891 B
--- 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) &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 | <code>T &#124; PromiseLike&lt;T&gt; &#124; undefined</code> | The value to check. | <b>Returns:</b> `value is PromiseLike<T>`