Comments (5)
Hello @alexdresko,
First of all, yes, the way I'm actually building the .tt file right now is extremely manual, I'm thinking of some way to automate this to make it easier for others to contribute to the project. I'm definitely ashamed that I haven't got around to fix that yet.
I am not familiar with BreezeJS actually, but I downloaded your gist and looked at the generated .d.ts-file. It seems that a getter/setter function for each property and an extends breeze.Entity
for each interface is pretty much what you would like?
I have thought about some general way of abstracting the code generation. I reckon that it could be useful for other JS frameworks as well (for instance knockout, if you use the ko.mapping plugin). I haven't really come up with a perfect solution yet, but another interface attribute, such as TypeScriptBreezeInterfaceAttribute
as you mentioned, and a code generator that is aware of how to format code for this type of interface, could definitely be the correct way to go.
from t4ts.
This all sounds great! You're right about the changes I made, but I'm definitely not enough of a Breeze expert to know all of the modifications that a TypeScriptBreezeInterfaceAttribute should make. Hopefully we'll hear more from the community on the subject.
One thing I failed to mention is that the modifications I made are actually to support both Breeze AND (at least partially) Knockout. Perhaps a final solution would require creating both a Breeze and a Knockout attribute for T4TS. My brain starts to spin a little when I think about fully supporting Breeze and Knockout at the same time though because I know TypeScript doesn't support multiple inheritance.
As a side note, I don't know that there's anything necessarily wrong with how you've structured the T4TS solution. If it works, it works. :)
from t4ts.
Is using @alexdresko 's files still the best way to go for breeze support?
from t4ts.
It has worked for me so far, but it has since fallen a couple of releases behind T4TS, I believe. I'd really love if @cskeppstedt could provide some official integration as mentioned in his original reply. I'd gladly help if I knew the best place to start.
from t4ts.
Hey guys, yeah It's my plan, unfortunately I haven't found the time to focus on this yet. In the meantime, go with @alexdresko's way, and I hope I'll get around to actually come through with this soon!
from t4ts.
Related Issues (20)
- Error with partial classes HOT 3
- Nice tool but getting out of date...any plans to maintain or any good replacements? HOT 1
- Doesn't pull inherited properties HOT 3
- How to build the project for deployment HOT 2
- Incorrect use of inherited classes HOT 1
- Support for enums HOT 7
- TypeScriptInterface decorated classes in depended assemblies resolve to "any" HOT 2
- Add support for System.DateTimeOffset HOT 3
- Add Support for C# @ Prefix HOT 1
- Add setting to choose class or interface HOT 1
- Чет нифига не пашет твоя приблуда
- Does not work with partial classes
- TypeScriptInterface attribute for C# interfaces? HOT 1
- Support for IDicionary HOT 1
- Not fetching projects if they are inside a solution folder HOT 1
- does not work with typescript 1.5/VS 2015 RTM
- Nested classes does not generate interfaces HOT 1
- Custom place where the T4TS.d.ts file is generated HOT 2
- declare module is used even when CompatibilityVersion >= 1.5 HOT 2
- Support for .NET Core
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 t4ts.