We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'd like to be able to add defaults for properties of type Date\DateTime, which would default to current time if not set.
Currently the default cannot be created via the Clock service (like with DateTime.now) since defaults cannot be effectful.
Add static makeEffect (effectful counterpart of make) to Struct and Class and and allow effects to be used in constructor defaults and in optionalWith
optionalWith
currently it's possible to achieve effectul defaults when encoding and decoding by creating a custom transform. This has a couple of drawbacks:
implementation of effectful encode\decode defaults can be found here (decode) and here (encode)
related issue: #3919 related discrod thread: https://discord.com/channels/795981131316985866/1304719283263246400
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What is the problem this feature would solve?
I'd like to be able to add defaults for properties of type Date\DateTime, which would default to current time if not set.
Currently the default cannot be created via the Clock service (like with DateTime.now) since defaults cannot be effectful.
What is the feature you are proposing to solve the problem?
Add static makeEffect (effectful counterpart of make) to Struct and Class and and allow effects to be used in constructor defaults and in
optionalWith
What alternatives have you considered?
currently it's possible to achieve effectul defaults when encoding and decoding by creating a custom transform. This has a couple of drawbacks:
implementation of effectful encode\decode defaults can be found here (decode) and here (encode)
related issue: #3919
related discrod thread: https://discord.com/channels/795981131316985866/1304719283263246400
The text was updated successfully, but these errors were encountered: