Page Contents

Home > @loopback/context > ResolutionSession > runWithInjection

ResolutionSession.runWithInjection() method

Run the given action with the given injection and session

Signature:

static runWithInjection(action: ResolutionAction, injection: Readonly<Injection>, session?: ResolutionSession): any;

Parameters

Parameter Type Description
action ResolutionAction A function to do some work with the resolution session
injection Readonly<Injection>  
session ResolutionSession (Optional) The current resolution session

Returns:

any