aboutsummaryrefslogtreecommitdiff
path: root/src/js/builtins/AsyncContext.ts
blob: 1c55feeba8261c889b5ed37ff894f53ee74f2442 (plain) (blame)
1
2
3
4
5
6
7
8
9
// Used by async_hooks to manipulate the async context

export function getAsyncContext(): ReadonlyArray<any> | undefined {
  return $getInternalField($asyncContext, 0);
}

export function setAsyncContext(contextValue: ReadonlyArray<any> | undefined) {
  return $putInternalField($asyncContext, 0, contextValue);
}