Search code examples
visual-studiovisual-studio-2013typescriptresharperweb-essentials

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.


Solution

  • 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...