Page Contents

Home > @loopback/context > ContextView > (constructor)

ContextView.(constructor)

Create a context view

Signature:

constructor(context: Context, filter: BindingFilter, comparator?: BindingComparator | undefined, resolutionOptions?: Omit<ResolutionOptions, "session"> | undefined);

Parameters

Parameter Type Description
context [Context](/doc/en/lb4/apidocs.context.context.html) Context object to watch
filter [BindingFilter](/doc/en/lb4/apidocs.context.bindingfilter.html) Binding filter to match bindings of interest
comparator [BindingComparator](/doc/en/lb4/apidocs.context.bindingcomparator.html) \| undefined _(Optional)_ Comparator to sort the matched bindings
resolutionOptions Omit<[ResolutionOptions](/doc/en/lb4/apidocs.context.resolutionoptions.html), "session"> \| undefined _(Optional)_