TypeScript Version: 3.0.3
Search Terms:
project references
watch
build
Code
This doesn't work:
./node_modules/.bin/tsc --build -w
error TS5072: Unknown build option '-w'.
This does:
./node_modules/.bin/tsc --build --watch
Related Issues: https://github.com/Microsoft/TypeScript/issues/25613
We only have a few build flags at the moment (and intend to add more later), so for the time being we're not assigning single-letter variants. Once we're more confident that watch will be the most common w option, we'll make the shorthand equivalents work
@RyanCavanaugh but -w is already the shorthand for --watch when using tsc without --build. Isn't that _really_ weird if -w changes conditionally based on whether or not it's used with --build?
$ tsc --help
Version 3.0.3
...
-w, --watch Watch input files.
Just noticed we already have short flags for other stuff under --build... so yeah let's assign w to watch.
@RyanCavanaugh you forgot to reopen, also this might be a good one for help wanted/good first issue?
This is fixed in master?
This appears to be resolved in the nightly build:
$ npm install typescript@next
$ ./node_modules/.bin/tsc --version
Version 3.2.0-dev.20180929
$ ./node_modules/.bin/tsc --build -w
[8:39:12 AM] Starting compilation in watch mode...
Most helpful comment
@RyanCavanaugh you forgot to reopen, also this might be a good one for help wanted/good first issue?