@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
63 lines (33 loc) • 1.03 kB
Markdown
---
lang: en
title: 'API docs: context.getter.fromvalue'
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.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.
**Signature:**
```typescript
function fromValue<T>(value: T): Getter<T>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
value
</td><td markdown="1">
T
</td><td markdown="1">
</td></tr>
</tbody></table>
**Returns:**
[Getter](./context.getter.md)<!-- --><T>