"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AsyncWrap = void 0;
const AsyncWrap = (unit, _, wrapper) => {
    let $unit = unit;
    for (const ___ of _) {
        const AsyncWrapper = wrapper[___];
        if (!AsyncWrapper) {
            throw new Error('async wrapper is not registered');
        }
        const api = AsyncWrapper(unit);
        for (const method in api) {
            $unit[method] = api[method];
        }
    }
    return $unit;
};
exports.AsyncWrap = AsyncWrap;
//# sourceMappingURL=AsyncWrap.js.map