Join the Stack Overflow Community
Stack Overflow is a community of 6.8 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

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
up vote 3 down vote accepted

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

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

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.