Comments (7)
DateTime?
also seems to be generating DateTime<DateTime> | null
and importing DateTime as a custom type.
from ntypewriter.
Something weird is going on, there are unit tests for those cases, and they are passing with flying colours. Could you prepare a simple minimal project that exposes problems and upload it on github? Also what version of VS are you using?
from ntypewriter.
Simple, minimal project works as expected. Using latest VS 2019 updates.
I'll see if I can debug the plugin itself (not familiar with the process, but I'll take a look), to see what about this project would cause it. I m using EFCore 6, and these are models for that, but even after removing EF attributes they are rendering like that.
from ntypewriter.
OK, I did not figure out how to debug it, however I tried with the https://github.com/TietoEVRY/NTypewriterCLI CLI interface, and that worked correctly, when pointing at the project file.
But that lead me to review the project in more detail, and I realized this is VS2019, but the project is itself the RC build of .NET6. If I change the TargetFramework to net5.0, it works. So this is on me for using RC build. But it may be worth identifying the cause, as it is RC now but it will be launching in a little over a month!
I can try and dig a little more when/if I get some time, but feel free to close this if you don't want to resolve for .NET6 yet.
from ntypewriter.
How did you manage to build/compile .net 6.0 project with VS 2019? As far as I know, VS 2019 does not support .net 6.0 projects, you can open them, but you will not be able to build/compile...
from ntypewriter.
@vcastellano-spl congrats for diving into the problem and helping out the maintainer of the project, not something many people do!
Also maybe it's a typo, but you should use ;
instead of ,
in the TS interface definition to separate the properties.
from ntypewriter.
@NeVeSpl Long story, but this was because I was developing on two different machines, and the C# code was on a machine I was using VS2022 Preview on, and the frontend code was being developed on a different machine, and I was just trying to get the models to be available (but not compiling or running). Anyways, I am sorry for the confusion, I should have known it would be something like this. We can close this out as there's already a VS2022.
@Etchelon I should move it over, I'm newer to TS, and used the example for the template in the comments #34, which uses commas (which seem to be supported since TS1.6?) but agreed best practices show as ;
.
from ntypewriter.
Related Issues (20)
- Changes from GIT not picked up by NTypewriter HOT 3
- How to convert .NET classes to TypeScript? HOT 4
- Attributes generate values that are region dependent HOT 3
- Dynamic property throws error
- How to get Class from Action.ReturnType or Action.Parameters HOT 3
- IEnumValue should implement ISymbolBase HOT 5
- Allow to use Regex (from System.Text.RegularExpressions) in .nt.cs files HOT 1
- Enum Attribute arguments are stored as Type Object HOT 5
- AttributeArgument with null value, TypedConstant ToString throws NullReferenceException HOT 1
- extracting argument from attribute now fails HOT 5
- Action.ReturnType has is broken with introduction of TypedConstant. HOT 6
- FR: please include the vsix package file in the list of assets for the release. HOT 2
- AttributeArgument.Value is not always ITypedConstant or ITypedConstant[] HOT 4
- AttributeArgument.Value.Tostring() causes exception: TypedConstant is an array. Use Values property
- Unable to build project with SourceGenerator: 'ITypedConstant' could not be found HOT 2
- Unable to debug SourceGenerator, no output and no log files created HOT 6
- Why does Type.ToTypeScriptType ignore nullable if [Required] attribute is present? HOT 4
- Template processing fails when reading arguments from an Attribute that has arguments with default values (Roslyn project) HOT 3
- Missing default value for DateTime
- Incremental Generator HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ntypewriter.