Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports.process = function transform(src, path, config, transformOptions) {
const tsResult = tsTransformer.process(src, path, config, transformOptions);
const jsPath = path.replace('.ts', '.js');
const source = typeof tsResult === 'string' ? tsResult : tsResult.code;
return babelTransformer.process(source, jsPath, config, transformOptions);
};