Reinforced.Typings icon indicating copy to clipboard operation
Reinforced.Typings copied to clipboard

Would be nice to have file and line number included in RT0003

Open Dmitry-Me opened this issue 3 years ago • 2 comments

So a coworker of mine wrote some C# class and annotated it with [TsInterface] attribute and the class has a DateTime property. When the project is being built I see this warning:

Reinforced.Typings : Type resolvation warning RT0003: Could not find suitable TypeScript type for System.DateTime. 'any' assumed.

and it gives me no clue what to look for. It would be nice if it included source file path and line number so I could just click on it and get to the line of C# code which declares the property.

Dmitry-Me avatar Aug 06 '21 13:08 Dmitry-Me

ReinforcedTypings does not work with source files, it works with compiled assemblies, which dont have filename or linenumber information, so it would be complex to try and work out what the source file or line number for the given Type is.

That being said, adding the class name and the field name should be relatively easy.

ReinisV avatar Dec 23 '21 12:12 ReinisV

To get around this limitation, you could insert System.Diagnostics.Debugger.Launch(); at the start of ReinforcedTypingsConfiguration.Configure() to attach a debugger and step through to see where the problem is happening.

Snazzie avatar Jan 17 '22 19:01 Snazzie