score:11

Accepted answer

the answer provided by @jason is close to what i needed.

in the end i ran this command

npx tsc --jsx preserve -t es2020 --outdir js --noemit false

this generated the .js and .jsx files in the js folder which can be copied over to non-typescript systems.

--noemit false is needed for the expo generated tsconfig.js which is noemit: true

the -t es2020 generates output using es2020 standards so you can get import and export along with the async await intact.

score:2

in the tsconfig.json file change "jsx": "react" to "jsx": "preserve" and then run tsc.

https://www.typescriptlang.org/docs/handbook/jsx.html


Related Query

More Query from same tag