UNPKG

785 BPlain TextView Raw
1// Copyright (c) .NET Foundation. All rights reserved.
2// Licensed under the MIT License.
3
4import * as types from '@azure/functions';
5import { InvocationHookContext } from './InvocationHookContext';
6
7export class PostInvocationContext extends InvocationHookContext implements types.PostInvocationContext {
8 #init: types.PostInvocationContextInit;
9
10 constructor(init?: types.PostInvocationContextInit) {
11 super(init);
12 this.#init = init ?? {};
13 }
14
15 get result(): unknown {
16 return this.#init.result;
17 }
18
19 set result(value: unknown) {
20 this.#init.result = value;
21 }
22
23 get error(): unknown {
24 return this.#init.error;
25 }
26
27 set error(value: unknown) {
28 this.#init.error = value;
29 }
30}