These are chat archives for TypeStrong/atom-typescript

15th
Oct 2015
Jeon, TaeKyung
@greatelv
Oct 15 2015 02:35
master @basarat. i have a question
the problem is multiple tsconfig files in project.
Error message is "a.ts is not included in the Typescript compilation context. If this is not intended, please check the 'Files', 'filesClob' section of your tsconfig.json file.
Jeon, TaeKyung
@greatelv
Oct 15 2015 02:41
I hope to set a specific tsconfig in project
one thing out of multiple tsconfig..
is possible ?
Basarat Ali Syed
@basarat
Oct 15 2015 04:04

@greatelv say you have :

root
| > tsconfig.json
|> a.ts
|> somedir
           |>  tsconfig.json
           |>  b.ts

then if you open a.ts the root tsconfig.json is activated ... and used ... even for b.ts

does that answer your question?
Jeon, TaeKyung
@greatelv
Oct 15 2015 04:23
um... in my case, the sub tsconfig in somedir is activated for b.ts
if i remove tsconfig in somdir, then root tsconfig activated
Basarat Ali Syed
@basarat
Oct 15 2015 04:24
@greatelv even after you open a.ts?
Jeon, TaeKyung
@greatelv
Oct 15 2015 04:35
!?
if i first access the b.ts, not working.
but first a.ts, next accessing b.ts is working
Basarat Ali Syed
@basarat
Oct 15 2015 04:36
@greatelv yup. That is by design. We cache the tsconfig.json against each file. So if root tsconfig is parsed ... it is marked for b.ts as well and then used for b.ts as well and no lookup is performed in somedir
So if working on b.ts project ... only have b.ts file open
if working on a.ts project ... have a.ts opened at least once
@greatelv at any point you can refresh the cache by closing all files of the non desired project and run sync command
Jeon, TaeKyung
@greatelv
Oct 15 2015 04:38
oh, i didn't know that
Basarat Ali Syed
@basarat
Oct 15 2015 04:38
A better UX would a project selector that shows the tsconfig.json files available in current working dir
@greatelv would like to add ... definitely consider using commonjs and not having multiple tsconfig.json files
@greatelv with webpack
:rose:
Jeon, TaeKyung
@greatelv
Oct 15 2015 04:42
Thanks your answer!