@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
26 lines (17 loc) • 831 B
Markdown
---
lang: en
title: 'API docs: context.valuefactory'
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.valuefactory.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [ValueFactory](./context.valuefactory.md)
## ValueFactory type
A factory function for `toDynamicValue`
<b>Signature:</b>
```typescript
export declare type ValueFactory<T = unknown> = (resolutionCtx: ResolutionContext) => ValueOrPromise<T | undefined>;
```
<b>References:</b> [ResolutionContext](./context.resolutioncontext.md)<!-- -->, [ValueOrPromise](./context.valueorpromise.md)