Promises can transform data by returning new promises. For example if outerPromise
resolves to {innerData: {name: "inner"}}, resultPromise will be a rejected promise
with the reason as {name: "inner"}:

Any values you want the custom element to hold must be defined on the ViewModel. If the ViewModel
is a plain Object, that object will be used to extend DefineMap and create a new
type. The following specifies a map property that can be any value: