Comments (2)
Typewriter converts them to Date
thus it will stay that way in NTypewriter too as default. But I see no reason why not to make it configurable as it was done in PR #7 with nullable types.
from ntypewriter.
Last night as I was comparing all the Urls created by NTypewriter to those created by Typewriter, I realized that I was wrong to request this "feature". I still believe that best practice is to pass dates between the front end and back end as strings and not DateTime/DateTimeOffset objects. But I remembered that you can't just "fix" it on the Typescript side, you have to make your DTO use string for those fields. My suggestion for best practice date handling is to never have your DTO include a DateTime or DateTimeOffset object, but instead use strings for those fields. This puts the proper handling of the conversion to and from the Date objects in your code's control, not hidden in some middleware.
I have closed the PR and I am closing this. If someone feels this is necessary, then the PR is still there and can be modified to suit, but I don't feel this is necessary. Sorry for the noise.
from ntypewriter.
Related Issues (20)
- Changes from GIT not picked up by NTypewriter HOT 3
- This is perfect for AI
- Failed to compile user code (System.Collections) HOT 10
- Source Generator ArgumentNullException HOT 8
- 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.