UNPKG

@loopback/docs

Version:
23 lines (15 loc) 758 B
--- lang: en title: 'API docs: context.resolutionoptions.optional' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.context.resolutionoptions.optional.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [ResolutionOptions](./context.resolutionoptions.md) &gt; [optional](./context.resolutionoptions.optional.md) ## ResolutionOptions.optional property 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. <b>Signature:</b> ```typescript optional?: boolean; ```