PreInvocationContext class

Context on a function before it executes.

Extends

Constructors

PreInvocationContext(PreInvocationContextInit)

For testing purposes only. This will always be constructed for you when run in the context of the Azure Functions runtime

Properties

functionHandler

The function handler for this specific invocation. Changes to this value will affect the function itself

inputs

The arguments passed to this specific invocation. Changes to this array will affect the inputs passed to your function

Inherited Properties

hookData

The recommended place to store and share data between hooks in the same scope (app-level vs invocation-level). You should use a unique property name so that it doesn't conflict with other hooks' data. This object is readonly. You may modify it, but attempting to overwrite it will throw an error

invocationContext

The context object passed to the function. This object is readonly. You may modify it, but attempting to overwrite it will throw an error

Constructor Details

PreInvocationContext(PreInvocationContextInit)

For testing purposes only. This will always be constructed for you when run in the context of the Azure Functions runtime

new PreInvocationContext(init?: PreInvocationContextInit)

Parameters

Property Details

functionHandler

The function handler for this specific invocation. Changes to this value will affect the function itself

functionHandler: FunctionHandler

Property Value

inputs

The arguments passed to this specific invocation. Changes to this array will affect the inputs passed to your function

inputs: unknown[]

Property Value

unknown[]

Inherited Property Details

hookData

The recommended place to store and share data between hooks in the same scope (app-level vs invocation-level). You should use a unique property name so that it doesn't conflict with other hooks' data. This object is readonly. You may modify it, but attempting to overwrite it will throw an error

hookData: Record<string, unknown>

Property Value

Record<string, unknown>

Inherited From InvocationHookContext.hookData

invocationContext

The context object passed to the function. This object is readonly. You may modify it, but attempting to overwrite it will throw an error

invocationContext: InvocationContext

Property Value

Inherited From InvocationHookContext.invocationContext