Open josephjclark opened 1 week ago
Ooh maybe as
as('lookup_table.option_set', get('fixture/?fixture_type=option_set_mapping'))
I like this because it's quite natural language-y. It would be better to do like get(something).as(key)
, but the as
function would have no means to restore the prior state. The get
would just blat it. References would be a workaround but we can't guarantee it will have written.
A common use case is to run an operation and then to save the result back to state on a key other than data
Like this:
This is really quite painful.
What if we had a wrapper operation that was able to take any state.data object and proxy/alias/push it to some other key:
The implementation is something like this:
I don't like name though. Some ideas: