Replies: 1 comment
-
Yeah TS wouldn't be your friend. You might be interested in this project with similar syntax built on Solid: https://github.com/orenelbaum/babel-plugin-reactivars-solid Honestly I have no interest messing with this. The fact accessors are just functions is a superpower. If there was a way to get rid of the function calls that'd be something but replacing JavaScript for an arbitrary syntax is asking for downstream complexity with very little benefit. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It is only a syntactic sugar but I think it will make cleaner than accessor functions, expecially when signals are inside other parenthesys.
Eventually an underscore could do the trick.
Personally I'd prefer a postfix $ to access signal value.
Before:
After
I think it should only transpile from
signal$
tosignal()
Don't know if it is easy to implement in Typescript
Beta Was this translation helpful? Give feedback.
All reactions