@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
107 lines (51 loc) • 1.91 kB
Markdown
---
lang: en
title: 'API docs: context.resolutionoptions'
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.resolutionoptions.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [ResolutionOptions](./context.resolutionoptions.md)
## ResolutionOptions interface
Options for binding/dependency resolution
**Signature:**
```typescript
export interface ResolutionOptions
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
[asProxyWithInterceptors?](./context.resolutionoptions.asproxywithinterceptors.md)
</td><td markdown="1">
</td><td markdown="1">
boolean
</td><td markdown="1">
_(Optional)_ A boolean flag to control if a proxy should be created to apply interceptors for the resolved value. It's only honored for bindings backed by a class.
</td></tr>
<tr><td markdown="1">
[optional?](./context.resolutionoptions.optional.md)
</td><td markdown="1">
</td><td markdown="1">
boolean
</td><td markdown="1">
_(Optional)_ A boolean flag to indicate if the dependency is optional. If it's set to `true` and the binding is not bound in a context, the resolution will return `undefined` instead of throwing an error.
</td></tr>
<tr><td markdown="1">
[session?](./context.resolutionoptions.session.md)
</td><td markdown="1">
</td><td markdown="1">
[ResolutionSession](./context.resolutionsession.md)
</td><td markdown="1">
_(Optional)_ A session to track bindings and injections
</td></tr>
</tbody></table>