Good day, Stakloverfluchane, I try to use TypeScript in my Asp.Net MVC 4 application, I defined a class in one file

class Notice{ public title:string; public description: string; } 

In another file I try to create an instance of this class, while adding the following line at the top:

 /// <reference path="../scr/app.ts"/> 

And I create a copy like this:

  var notice: Notice = new Notice(); 

At the output, I get an error saying that Notice is no defined, I tried to include the file on the page itself via <script src=".. , but I still get the same error, please help me to understand, thanks in advance to everyone for the answers!

  • where does this error come in? - Grundy
  • @Grundy oh, I forgot to point out, I'm sorry. The error occurs in the browser console. - Uladzimir Khadakouski
  • and what are you connecting to the page and how? - Grundy
  • @Grundy and on the page I connect via the <script arc = "createConyroller.js"> </ script> tag in this file I create an instance, I also tried to add the file where the class from which I create the instance is stored. - Uladzimir Khadakouski

0