Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "Class emulation may be converted to class" hint mean in Visual Studio and where does it come from?

I am working on a large TypeScript application in VS 2013. I have ReSharper and WebEssentials installed.

Time to time when I have an exported module level function, "something" underlines it and hints that "Class emulation may be converted to class". What does this mean, and from which tool it comes from?

Did anyone see this before? Surprisingly there are no Google results for this sentence in quotes.

like image 694
Zoltán Tamási Avatar asked Nov 27 '15 09:11

Zoltán Tamási


1 Answers

It must look like an emulated class... ReSharper may be guessing you hard coded your own class in Typescript, rather than defining it and letting the compiler create the JS.

Adding a return type of void removes the warning...

like image 110
Daryl Avatar answered Oct 16 '22 11:10

Daryl