Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function transform(
code /*: string*/,
options /*: TransformOptions*/,
plugins /*: Array*/,
)/*: void*/ {
const opts = {
ast: false,
code: false,
filename: options.filename,
plugins: SyntaxPlugins.list.concat(plugins, [[fbt, options]]),
sourceType: 'unambiguous',
};
babel.transformSync(code, opts);
}
function transform(
code /*: string*/,
options /*: TransformOptions*/,
plugins /*: Array*/,
)/*: void*/ {
const opts = {
ast: false,
code: false,
filename: options.filename,
plugins: SyntaxPlugins.list.concat(plugins, [[fbt, options]]),
sourceType: 'unambiguous',
};
babel.transformSync(code, opts);
}