---
lang: en
title: 'API docs: context.valueorpromise'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.context.valueorpromise.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [ValueOrPromise](./context.valueorpromise.md)

## ValueOrPromise type

Representing a value or promise. This type is used to represent results of synchronous/asynchronous resolution of values.

Note that we are using PromiseLike instead of native Promise to describe the asynchronous variant. This allows producers of async values to use any Promise implementation (e.g. Bluebird) instead of native Promises provided by JavaScript runtime.

<b>Signature:</b>

```typescript
export declare type ValueOrPromise<T> = T | PromiseLike<T>;
```

