Page Contents

Home > @loopback/rest > ControllerFactory

ControllerFactory type

A factory function to create controller instances synchronously or asynchronously

Signature:

export type ControllerFactory<T extends ControllerInstance> = (ctx: Context) => ValueOrPromise<T>;

References: ControllerInstance, Context, ValueOrPromise