2016-07-24 63 views
1

我需要添加所产生的文件夹,它是全球性的环境,也不在src既不部分,为源文件作为有效名称空间,如低于电源模块:包括外src文件夹为打字稿编译

root 
|- src 
    |-- component 
     |-- test.model.ts (import { IBuilding } from 'api/interfaces.ts'); 
|- generated 
    |-- api 
     | interfaces.ts (export interface IBuilding {}) 

我看了一下模块模组分辨率正式文件,但没有下面的选项见应用于:

  • tsconfig.json - > compilerOptions.paths(路径映射)
  • tsconfig.json - > compilerOptions.rootDirs(虚拟目录)
  • tsconfig.json - >包括(文件名模式)

对我来说,这将是非常类似于CLASSPATHPYTHON_PATH分别针对Java和Python。

任何人都可以帮忙吗?

回答

1

好像你可以做到这一点在你的tsconfig.jsonfilesGlob

"filesGlob": [ 
    "**/*.ts", //Local source, this is the default 
    "../generated/**/*.ts" //generated source 
], //Add as many directories to the above list as needed