Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Dmitry-Me opened this issue Aug 6, 2021 · 2 comments
Open

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

Dmitry-Me opened this issue Aug 6, 2021 · 2 comments

Comments

@Dmitry-Me
Copy link

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.

@ReinisV
Copy link

ReinisV commented Dec 23, 2021

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.

@Snazzie
Copy link

Snazzie commented Jan 17, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants