Integrate typescript and javascript files in angular same project

Is it possible to have both typescript and javascript files in one angular project?

I have a rather large project in angular and I want to port it to typescript without renaming all the files in .ts and fixing bugs. Is it possible to have only one part of an angular application written in typescript and the other in javascript?

+5
source share
1 answer

Yes, maybe with the last flag --allowjs in typescript 1.8. You can modify your tsconfig.json to include it as follows:

{ "compilerOptions": { "allowJs": true } } 

See the roadmap for more information: Typescript 1.8 , namely here: link

+9
source

Source: https://habr.com/ru/post/1243153/


All Articles