In VS2013 building stops when tsc exits with code 1. This was not the case in VS2012. How can I run my solution while ignoring the tsc.exe error? I get many The property ‘x’ does not exist on value of type ‘y’ errors, which I want to ignore when using javascript functions. Answer I kno…
Tag: typescript
TypeScript in combination with BreezeJS
I’m currently working on a project prototype with TypeScript in combination with BreezeJS. I’m using the HotTowel template from John Papa and wrote my own TypeScript ViewModels for each HTML page. To use normal JavaScript libs you need a TypeScript file file.d.ts which is some sort of interface cl…
TypeScript static classes
I wanted to move to TypeScript from traditional JS because I like the C#-like syntax. My problem is that I can’t find out how to declare static classes in TypeScript. In C#, I often use static classes to organize variables and methods, putting them together in a named class, without needing to instatiat…
Set window.location with TypeScript
I am getting an error with the following TypeScript code: I am getting an underlined red error for the following: The message says: Does anyone know what this means? Answer window.location is of type Location while .attr(‘data-href’) returns a string, so you have to assign it to window.location.hr…
TypeScript declaration file for function with variable number/type of arguments
headjs does some very crazy JavaScript type things to its API. For instance it takes an arbitrary number of strings (not a string array) for a function. Sometimes it ends that same function call, you can optionally end it with a function, for example. You can also (just as easily) do the following My question…
Why can I access TypeScript private members when I shouldn’t be able to?
I’m looking at implementation of private members in TypeScript, and I find it a little confusing. Intellisense doesn’t allow to access private member, but in pure JavaScript, it’s all there. This makes me think that TS doesn’t implement private members correctly. Any thoughts? Answer J…
What is TypeScript and why would I use it in place of JavaScript? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago. Improve this question Can you please describe what the TypeScript language is? What can it do th…