This change makes a few simplifications to how properties are exposed in the system, mostly in the name of usability, but also to feel a bit more like "idiomatic JavaScript". Namely: * Rename `then` to `mapValue`. This hopefully helps to suggest that this is meant for a dataflow style of programming. * Move Property<T> into the runtime module, and remove PropertyState<T>, collapsing back down to a single type. This also eliminates some of the messy internal runtime casting, accessing of internal members, etc. * Export a Computed<T> interface from the root of the module. This is the entirety of the public-facing surface area for properties, and exposes that single `mapValue` member function. The internal runtime logic understands how to handle Property<T>s specifically in addition to Computed<T>s more generally (in case someone writes their own). |
||
---|---|---|
.. | ||
runtime | ||
config.spec.ts | ||
init.spec.ts | ||
util.ts |