typescript init templates: exclude cdk.out from tsconfig
Describe the bug
TypeScript files in cdk.out cause build to fail.
Example:
test/cdk.out/asset.c55a2043716c67ea5aa695ba9dae511816ddae166121bd37ef197cd34e3f0dcc/index.ts:3:28 - error TS2307: Cannot find module '../aws-custom-resource'.
Simply adding cdk.out to the excludes in tsconfig.json doesn't seem to work, but I don't know why.
Maybe it should be cdk_out/** ?
I tried that along with various forms of cdk.out/**/*.ts it didn't look like it was trying to compile them, because I had my include set to specific folders too. It seemed to be just including them in it's check's and the complaining at duplicated block scope variables. (Like const AWS = require('aws-cdk') because it's outside of module scope. Fine in my app of a single script, but it shows that it's still using those files.
@joshrp are you building with plain typescript (tsc) or with jsii?
Plain tsc almost everything is as it was set up by cdk init. I added a ./src/func.ts file, and that conflicts with it's corresponding .ts file in ./cdk.out/asset.... I can try and grab some more debug info when I'm back on it tomorrow if you let me know what you need?
Please ignore everything I said. I am an idiot and shall be handing in my Developers license for a 24 hour suspension.
I used the wrong file.
Using just cdk.out in the excludes array works great and I guess it should be there by default?
I believe this has already been addressed through #2709