Dev Helpers
← Back

Check the execution ID type

Check the execution ID type using Node.js.

Open this example in the interactive library

Source code

import {
  AsyncLocalStorage,
  AsyncResource,
  executionAsyncId,
} from "node:async_hooks";
const context = new AsyncLocalStorage();
console.log(Number.isInteger(executionAsyncId()));

Sample output

true