1 |
|
2 |
|
3 |
|
4 | import * as types from '@azure/functions';
|
5 | import { InvocationHookContext } from './InvocationHookContext';
|
6 |
|
7 | export 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 | }
|