Page Contents

Home > @loopback/context > AsInterceptedFunction

AsInterceptedFunction type

The intercepted variant of a function to return ValueOrPromise<T>. If T is not a function, the type is T.

Signature:

export type AsInterceptedFunction<T> = T extends (...args: InvocationArgs) => infer R ? (...args: Parameters<T>) => AsValueOrPromise<R> : T;

References: InvocationArgs, AsValueOrPromise