import init , { source , transformSync } from "./wasm.js" ; import { TransformConfig , ParserConfig } from "./types.ts" ; let __initialized = false ; async function _init ( ) { if ( __initialized ) return ; __initialized = true ; await init ( source ) ; } export async function transform ( code , opts ) { await _init ( ) ; return transformSync ( code , opts ) ; } export async function transpileDefault ( code ) { return await transform ( code , { jsc : { target : "es2019" , parser : { syntax : "typescript" , tsx : true , } , transform : { react : { pragma : "React.createElement" , pragmaFrag : "React.Fragment" , development : false , useBuiltins : true , throwIfNamespace : true , } , } , } , } ) ; }