"use strict";
/**
 * @adonisjs/http-server
 *
 * (c) Harminder Virk <virk@adonisjs.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.httpContextLocalStorage = exports.useAsyncLocalStorage = exports.usingAsyncLocalStorage = void 0;
/// <reference path="../../../adonis-typings/index.ts" />
const async_hooks_1 = require("async_hooks");
/**
 * Find if the async localstorage is enabled or not
 */
exports.usingAsyncLocalStorage = false;
/**
 * Toggle the async local storage
 */
function useAsyncLocalStorage(enabled) {
    exports.usingAsyncLocalStorage = enabled;
}
exports.useAsyncLocalStorage = useAsyncLocalStorage;
/**
 * Async local storage for the HTTP context
 */
exports.httpContextLocalStorage = new async_hooks_1.AsyncLocalStorage();
