@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
26 lines (17 loc) • 994 B
Markdown
---
lang: en
title: 'API docs: context.asinterceptedfunction'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.asinterceptedfunction.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [AsInterceptedFunction](./context.asinterceptedfunction.md)
## AsInterceptedFunction type
The intercepted variant of a function to return `ValueOrPromise<T>`<!-- -->. If `T` is not a function, the type is `T`<!-- -->.
<b>Signature:</b>
```typescript
export declare type AsInterceptedFunction<T> = T extends (...args: InvocationArgs) => infer R ? (...args: Parameters<T>) => AsValueOrPromise<R> : T;
```
<b>References:</b> [InvocationArgs](./context.invocationargs.md)<!-- -->, [AsValueOrPromise](./context.asvalueorpromise.md)