@loopback/docs
Version:
Documentation for LoopBack 4
34 lines (21 loc) • 729 B
Markdown
lang: en
title: 'API docs: context.getter.fromvalue'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.context.getter.fromvalue.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [Getter](./context.getter.md) > [fromValue](./context.getter.fromvalue.md)
## Getter.fromValue() function
Convert a value into a Getter returning that value.
<b>Signature:</b>
```typescript
function fromValue<T>(value: T): Getter<T>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| value | <code>T</code> | |
<b>Returns:</b>
`Getter<T>`