Skip to content

tsc --watch regression in typescript@next: not detecting .tsx file changes (only .ts) #6511

Closed
@chbrown

Description

@chbrown

I'm using typescript@next (specifically, 1.8.0-dev.20160115) instead of typescript@1.7.5 because I want stateless functional component support in my React code. Running tsc --watch in my root project directory is working great for .ts files:

9:08:58 PM - File change detected. Starting incremental compilation...
9:09:00 PM - Compilation complete. Watching for file changes.

But it's not even flinching when a .tsx file changes. I downgraded to 1.7.5, and now (with no other changes) running tsc --watch recognizes changes to both .ts and .tsx files (despite complaining a bit about my JSX not evaluating to proper Elements or whatever).

I'm using a tsconfig.json with:

"compilerOptions": {
  "jsx": "react",
  "module": "commonjs",
  "moduleResolution": "node",
  "target": "ES6"
},

And a bunch of files added by hand, including both .ts and .tsx files in the root directory.

Like I said, 1.7.5 works just fine, so it's not something weird with my editor. Has .tsx been deprecated? (Which would be awesome— I'm all for deprecating .tsx and compiling all .ts files as if they were .tsx if compilerOptions.jsx !== undefined.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueHigh Priority

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions