@loopback/docs
Version:
Documentation for LoopBack 4
34 lines (21 loc) • 789 B
Markdown
lang: en
title: 'API docs: context.contextview.singlevalue'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
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 | <code>ResolutionSession</code> | |
<b>Returns:</b>
`Promise<T | undefined>`