---
lang: en
title: 'API docs: context.valueorpromise'
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.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.

**Signature:**

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

