Replace mapValue
with simply undefined
#339
Labels
impact/usability
Something that impacts users' ability to use the product easily and intuitively
kind/enhancement
Improvements or new features
Milestone
In #331, we discussed hiding "blocking" code behind a C++ boundary so that we can implement closure serialization in a sane way. As part of that, we began discussing the future of
mapValue
, since the "promises" nature of how resource properties work will be hidden from JavaScript.@lukehoban had the suggestion to simply model unavailable values during planning as
undefined
. Frankly,mapValue
just encodes this same thing in a strange and awkward way. It is possible to have conditional code in either model. And arguably theundefined
approach feels more like how it ought to be done in idiomatic JavaScript.For example, initializing some resource property dependent upon another would go like this:
This work item tracks removing
mapValue
and simply exposing all resource properties asT | undefined
, rather thanComputed<T>
.The text was updated successfully, but these errors were encountered: