Comments (3)
I just released version 2.3.0, which should fix this issue.
from typegen.
Hi, thanks for reporting the issue!
I'm on holiday now; I should be able to fix it on the weekend or the beginning of next week.
In the meantime, the solution could be to use TsTypeAttribute
and TsDefaultValueAttribute
on all properties/fields with enum values - this way you can e.g. set the type to number
(this will also cause the enum types to not be generated) and the default value to a numeric value.
This can be time consuming if you have a lot of enum properties, but I can't think of another way of doing it unfortunately.
I'll post any updates on the progress in this thread.
from typegen.
Just a small update: there are some new things I'd like to add to the next release, so I will release the new version probably in a couple of days.
Right now there is a TypeGen NuGet package on the dev branch (in the nuget
or nuget-dotnetcli
folder) that contains the fix for the bug mentioned in this thread - the updated package should generate enums with all possible underlying types correctly.
Until the next version is released you can use this package locally, and of course I'll post an update here when I make the release.
from typegen.
Related Issues (20)
- Intermittent interface inheritance
- TsTypeUnion only works in top level export
- Requesting improvements to CustomTypeMappings
- csNullableTranslation with null|optional values
- changing typeScriptFileExtension to a different dot-seperated extension does not update import statements
- [feat]: Ignore specific interfaces HOT 2
- Project Url still points to https://jburzynski.net/TypeGen/ HOT 1
- Interface dependencies no longer generated across multiple 'outputDir' directories HOT 2
- Issue with generics inheritance HOT 2
- How can I get rid of Typegen.Core.dll in the redist
- Invalid export for `System.Tuple` type HOT 1
- Programmatical API: Could not load file or assembly 'Namotion.Reflection
- Typegen used old net6.0 binaries from my project instead of net8.0 HOT 1
- Add a configuration option for Unix vs. Windows-style line endings
- Static members should always be ignored when generating interfaces
- Get-only C# properties should generate readonly TS properties
- ArrayOfNullable not being translated correctly
- Generated index file does not contain all types when both `generationSpecs` and `generateFromAssemblies` are used
- Add import path support for CustomTypeMappings HOT 1
- Does typegen support primary constructor fields? HOT 2
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 typegen.