diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-09-07 17:30:54 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-07 17:30:54 -0300 |
commit | bbccaf51222cb4bed73466164496f5bc1030292c (patch) | |
tree | fc26c89f44b84140ba01b9edabedef10c73a637a /src/data/things/composite.js | |
parent | c18844784bd1c0ead7c49d0519727b7a92e23e13 (diff) |
data: roll paired "byRef" and "dynamic" properties into one
Diffstat (limited to 'src/data/things/composite.js')
-rw-r--r-- | src/data/things/composite.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/data/things/composite.js b/src/data/things/composite.js index 29f5770c..96abf4af 100644 --- a/src/data/things/composite.js +++ b/src/data/things/composite.js @@ -1071,3 +1071,18 @@ export function raiseWithoutUpdateValue({ }, ]); } + +export function withUpdateValueAsDependency({ + into = '#updateValue', +} = {}) { + return { + annotation: `withUpdateValueAsDependency`, + flags: {expose: true, compose: true}, + + expose: { + mapContinuation: {into}, + transform: (value, continuation) => + continuation(value, {into: value}), + }, + }; +} |