Closed Ni55aN closed 5 years ago
Also, I started to test the use of Rete from decorators to create components, events and controls.
I have added @babel/preset-typescript
and build a code as before via rete-cli
without tons of dependencies
in each package. For type checking and generating .d.ts I'm using pure tsc
.
FYI, JS code also replaced with TS
What do you think about of incorporating decorators into this project? (Same as Angular or NestJS)
i.e:
@Component()
export class ComponentA { /* ... */ }
@Control()
export class ControlX { /* ... */ }
With functions:
@Event('nodecreated')
OnCreateNode(node: Node) {
console.log('Node created:', node)
}
It might be good to separate this new feature into a new repository (for maintainability reasons).
Some examples here
@juliandavidmr Thank you for your efforts . I would like to start a projet using Angular + Rete, I would like to know if it's better to use the official JS version or your version.
You think that you will be able to update your version every official Rete new release ?
I would ask your for a demo ( in stackblitz ) using Rete TS inside an angular projet if it's possible ? 👍
What do you think about of incorporating decorators into this project?
What is the advantage of decorators over inheritance in this case? What are the alternatives for JS?
@juliandavidmr events are well typed at the previous form
IMHO decorators in this case are not needed, moreover there is the issue of compatibility with JS
rete-cli@v0.6.0
supports additional babel presets and extensions, which allows to add TS support for plugins on demand
Hello, I converted all the source code from Rete to Typescript, including several improvements in type recognition ... All the changes are here: https://github.com/juliandavidmr/rete