---
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/strongloop/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) &gt; [@loopback/context](./context.md) &gt; [Getter](./context.getter.md) &gt; [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 | T |  |

<b>Returns:</b>

[Getter](./context.getter.md)<!-- -->&lt;T&gt;


