suneeth
suneeth

Reputation: 147

React-native typescript template not compiling tsc, tsx fles

I have created a new expo app with a blank (TypeScript) template, and create a script entry in a package JSON file like this.

"compile-project":"tsc --watch"

but the project not compiling the any of tsc, tsx files in my project directory while running the "compile-project" command.

here is my tsconfg file

{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "jsx": "react-native",
    "lib": ["dom", "esnext"],
    "moduleResolution": "node",
    "noEmit": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "strict": true
  }
}

Upvotes: 1

Views: 804

Answers (1)

tmhao2005
tmhao2005

Reputation: 17524

Looks like you're setting up to stop emit files by giving noEmit: true. This option is only useful for checking the typing only.

Try to switch it back to false to see the compiled files in the output:

tsconfig.json

{
  "compilerOptions": {
    // ...
    "noEmit": false,
  } 
}

Upvotes: 2

Related Questions