Skip to content

Lupa API Reference / network/types / NetworkRespondDynamic

Type Alias: NetworkRespondDynamic ​

NetworkRespondDynamic = (req) => NetworkRespondPayload | Promise<NetworkRespondPayload> | symbol | null | undefined

Defined in: src/network/types.ts:75

A closure function that executes dynamically when a matching request is intercepted. It receives the CapturedRequest and must return either a response payload, a promise of a payload, or the bypass symbol to explicitly skip mocking and fall through to the real network.

Parameters ​

req ​

CapturedRequest

Returns ​

NetworkRespondPayload | Promise<NetworkRespondPayload> | symbol | null | undefined