I am sorry for potentially damn question.
Problem:
I've got the class defined in typescript as so:
1 class MyClass {
2 constructor() {
3 alert("MyClass instantiated!");
4 }
5 }
6 export = MyClass;
It's compiled into javascript as follows:
1 var MyClass = (function () {
2 function MyClass() {
3 var _this = this;
4 alert("MyClass instantiated!");
5 }
6 }
7 module.exports = MyClass
It is referenced from the jsp page - which also does the following:
<script language='javascript' src="myclass.js">
var myclass = new MyClass();
</script>
Now, I've debugged it and it hits the line 1 (of compiled .js) and then exits at line number 7 of the same file.
Question:
Why doesn't it go in the function and exits? Am I instantiating it wrongly?