import { TransformOptions } from '@babel/core' ; import { ParserPlugin } from '@babel/parser' ; import reflowPlugin , { ReflowOptions } from '..' ; /**
 * Create the Babel configuration for runners using the plugin
 */ export function getTransformOptions ( overwrites = { } ) { const defaultOptions = { babelrc : false , comments : false , configFile : false , plugins : [ [ reflowPlugin , overwrites . pluginOptions ] ] , } ; return { ... defaultOptions , ... overwrites . transformOptions } ; } /**
 * Add Babel syntax plugins for commonly used features and technologies
 */ export function getParserPlugins ( typeSystem ) { const typePlugin = typeSystem === 'flow' ? [ 'flow' , { all : true } ] : 'typescript' ; return [ typePlugin , 'classProperties' , 'dynamicImport' , 'jsx' , 'nullishCoalescingOperator' , 'optionalChaining' , [ 'decorators' , { decoratorsBeforeExport : true , } , ] , ] ; }