Geeks With Blogs

News profile for Aligned at Stack Overflow, Q&A for professional and enthusiast programmers
"free in Christ Jesus from the law of sin and death." Romans 8:2 (ESV) Check out the Falling Plates video on YouTube.
more about the Gospel
And then listen to Francis Chan speaking at LifeLight in SD.

Donate Bitcoins

Check out Elapser from T3rse!

Programming and Learning from SD

I was trying to reference an existing JavaScript file from my new TypeScript file using

/// <reference path="app.js"/>

It wasn’t being found, until I found that you need to have the file saved as UTF-8. To do this in Visual Studio 2012 on Windows 7, click on file –> save as –> then click on the down arrow of the save button and choose save with encoding.

TypeScript then found my JavaScript and started parsing. Now I have a lot of errors  when I build the solution (other references aren’t correct (the file doesn’t exist, but it does), certain classes don’t exist in my setup namespaces (that I created, not using the modules of TypeScript))


This Codeproject article goes pretty in-depth, I’m going to look into this further, or just go back to plain old JavaScript and copy the compiled JavaScript of what I’ve done so far.

Posted on Friday, July 12, 2013 11:51 AM JavaScript , TypeScript | Back to top

Comments on this post: Referencing files TypeScript 0.9

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Aligned | Powered by: | Join free