Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type PropertyInitializer methods to concrete property types #321

Closed
ljacqu opened this issue Jun 20, 2023 · 0 comments
Closed

Type PropertyInitializer methods to concrete property types #321

ljacqu opened this issue Jun 20, 2023 · 0 comments
Milestone

Comments

@ljacqu
Copy link
Member

ljacqu commented Jun 20, 2023

PropertyInitializer returns all properties as Property<Boolean>, Property<String> which is the best way of declaring properties (I just need the property type and don't need to know the implementation), however when doing more complicated things it clearly becomes useful to have fields with the concrete property type. Therefore, I would like to return, for example, BooleanProperty from a method instead of Property<Boolean>.

It shouldn't impact many workflows since we rarely expect the method to be typed first and then to be assigned to a variable, given that they're constants and you have to think about the type.

@ljacqu ljacqu added this to the 1.4.0 Release milestone Jun 20, 2023
ljacqu added a commit that referenced this issue Jun 20, 2023
@ljacqu ljacqu closed this as completed Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant