@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
35 lines (22 loc) • 927 B
Markdown
lang: en
title: 'API docs: context.contextview.singlevalue'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.contextview.singlevalue.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [ContextView](./context.contextview.md) > [singleValue](./context.contextview.singlevalue.md)
## ContextView.singleValue() method
Get the single value
<b>Signature:</b>
```typescript
singleValue(session?: ResolutionSession): Promise<T | undefined>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| session | [ResolutionSession](./context.resolutionsession.md) | |
<b>Returns:</b>
Promise<T \| undefined>