typescript and jsx plugins should be
- turned off by default when the source type is not ts / jsx.
- can be turned off by an option
Change proposal:
struct TransformerImpl<'a, 'ctx> {
x0_typescript: TypeScript<'a, 'ctx>,
x1_react: React<'a, 'ctx>,
pub struct TransformOptions {
pub typescript: TypeScriptOptions,
pub react: JsxOptions,
}
Make these two optional.
In oxc_transformer/src/lib.rs,
change code to
self.x0_typescript.map(|plugin| plugin.enter_program(program, ctx));