Replies: 2 comments 1 reply
-
Sounds good. As long as it wouldn't encourage people to use signals |
Beta Was this translation helpful? Give feedback.
-
I think I can see the benefit of having a type alias which represents a value getter. Having arguments and return types which are functions can be a little confusing to look at so this would help sort of flatten those cases. I'm not sure what a good name is though: |
Beta Was this translation helpful? Give feedback.
-
As the name suggests, this is a feature request to define and export
export type Signal<T> = () => T
(I'm not actually set on a specific name for this type). While this is a very simple type alias, I think using this type alias throughout the codebase would make readingsolid-js
code and jsDocs generated by vscode easier. At the moment, when looking at a type declaration, sometimes I need to remind myself that thesomeFunction<T>(value: () => T)
declaration is expecting asolid-js
signal (someFunction<T>(value: Signal<T>)
would be more intuitive I think).Beta Was this translation helpful? Give feedback.
All reactions