"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.allowTs = void 0;
const esbuildUtils_1 = require("./esbuildUtils");
/**
 * Globally allow ts files to be loaded via `require()`
 */
const allowTs = () => {
    // eslint-disable-next-line node/no-deprecated-api
    require.extensions['.ts'] = (m, filename) => {
        m._compile(esbuildUtils_1.transformTsFileToCodeSync(filename), filename);
    };
};
exports.allowTs = allowTs;
