Is it possible to use TypeScript instead of JavaScript in a Django project developed using Visual Studio?
At the moment I just tried to add a .ts file and import it to a HTML file. It fails when finding non-Javascript syntax though. I was wondering what I was missing.
Do I have to configuration Visual Studio for it? (TypeScript sdk is already installed).
Is it going to pile the .ts files into JavaScript by itself or do I have to go through extra steps?
Is it possible to use TypeScript instead of JavaScript in a Django project developed using Visual Studio?
At the moment I just tried to add a .ts file and import it to a HTML file. It fails when finding non-Javascript syntax though. I was wondering what I was missing.
Do I have to configuration Visual Studio for it? (TypeScript sdk is already installed).
Is it going to pile the .ts files into JavaScript by itself or do I have to go through extra steps?
1 Answer
Reset to default 7You are going to have to pile your Typescript files in Javascript files.
The best way to do this is to use the tsc
mand available to you when installing typescript with a package manager like NPM.
Make sure you then import your Javascript files in your HTML files. If you're using Django Templates, then use Static Files to link to the appropriate Javascrpt files.
I hope this helps you :)
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744081605a4555398.html
评论列表(0条)