最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

angularjs - Integrate both typescript and javascript files into angular same project - Stack Overflow

programmeradmin7浏览0评论

Would it be possible to have both typescript and javascript files in the same angular project?

I have a pretty big project in angular and I want to migrate it to typescript without renaming all files to .ts and fix the errors. Would it be possible to have only one part of an angular application written in typescript and the other one in javascript?

Would it be possible to have both typescript and javascript files in the same angular project?

I have a pretty big project in angular and I want to migrate it to typescript without renaming all files to .ts and fix the errors. Would it be possible to have only one part of an angular application written in typescript and the other one in javascript?

Share Improve this question asked Feb 16, 2016 at 16:14 CrazyDogCrazyDog 3213 silver badges17 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 10

Yes it is possible with the latest flag --allowjs in typescript 1.8. You can modify your tsconfig.json to include it like this:

{ 
    "pilerOptions": { 
        "allowJs": true
    }
} 

See roadmap for more info: Typescript 1.8, and specifically here: link

发布评论

评论列表(0)

  1. 暂无评论