"use strict";
/**
 * Copyright: (c) Myia SAS 2026.
 * This file and its contents are licensed under the AGPLv3 License.
 * Please see the LICENSE file at the root of this repository
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.createAsyncEnclosingFunctionDetector = createAsyncEnclosingFunctionDetector;
function createAsyncEnclosingFunctionDetector(_t) {
    return function isAsyncEnclosing(nodePath) {
        let p = nodePath.parentPath;
        while (p) {
            if (p.isFunction()) {
                const fn = p.node;
                return fn.async === true;
            }
            p = p.parentPath;
        }
        return false;
    };
}
