This project is read-only.

--watch missing from build in Windows

Topics: General
Aug 27, 2013 at 6:29 AM
Edited Aug 27, 2013 at 6:29 AM
The TypeScript node.js compiler (tsc -h) no longer provides a --watch switch when running in Windows (Windows 8 in my case). In the TypeScript source code, in io.ts, I can see that there are two implementations of IIO, the second of which provides the node.js FileSystem implementation and the first of which provides a file system option provided by windows script host. When that matches, the watchFile implementation is null, so it doesn't show up in the list of compiler options.

The node.js fs implementation works fine, so why are we trying to use ActiveXObject("Scripting.FileSystemObject"), and why must this come with the price of eliminating the watchFile method?

The watch switch is more than just useful, it's incredibly annoying not having access to it after having relied on it for half of the project I've been working on so far. Why is it gone and how can I get it back?
Sep 3, 2013 at 2:15 PM
Sep 6, 2013 at 7:59 PM
It should be working with tsc.js when executing with node. I just verified it myself on Win8 running the below while editing the file (repro2.ts) in VS:
C:\test>node C:\Typescript\tsc.js -w repro2.ts

Recompiling (

Recompiling (
C:/test/repro2.ts(42,1): error TS2012: Cannot convert 'B' to 'A':
        Type 'B' is missing property 'x' from type 'A'.
Are you doing something different from the above and seeing it not work? This is with TypeScript
Sep 7, 2013 at 9:50 AM
Edited Sep 7, 2013 at 9:50 AM
I have discovered that there's a tsc.exe AND a tsc.js ... I take it the executable has come via the Visual Studio plugin. Now I have to decide what to do about it as both are in the path. Can we not simply add a watch flag to tsc.exe?
Sep 9, 2013 at 4:27 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.