This example is intended to demonstrate discrepancies in the
behavior between how the native typescript compiler and the
typescript API handle the rootDirs
tsconfig compiler option,
specifically when the typescript API is called through the
gulp-typescript
plugin. I have not (at this time) created a testcase to indicate
whether this is an issue with how I am using the gulp-typescript
plugin, with how the gulp-typescript plugin is using the
typescript API or with a discrepancy in how the typescript API
delegates to the typescript compiler.
note: the below commands will globally install typescript 2.0 (which was not the stable release at the time this project was created).
# 1. globally install typescript 2.0 (which supports the rootDirs configuration
npm install [email protected] -g
# echo 2. install this example's dependencies
npm install
# 3. confirm the typescript 2.0 compiler compiles without error
tsc
# 4. attempt the same compilation through the gulp-typescript plugin
gulp tsc
Steps 3 and 4 should behave identically
Step 3 compiles without warning or error while step 4 compiles with a semantic error.
I'm fairly fresh to Typescript development, so it's very possible I'm doing something wrong or have an invalid expectation arising from a fundamental misunderstanding.