https://stackoverflow.com/a/75449704/1541397
const ctx = create_context();
console.log(ctx.with("foo", () => {
return ctx() + ctx();
})); // "foofoo"
console.log(await ctx.with("bar", async () => {
await timeout(1000);
return ctx() + ctx();
})); // "barbar"
Generated using TypeDoc
Requires V8 and async stack traces feature. Credit to @WolverinDEV.