diff options
| author | (quasar) nebula <qznebula@protonmail.com> | 2025-12-06 13:25:28 -0400 |
|---|---|---|
| committer | (quasar) nebula <qznebula@protonmail.com> | 2025-12-06 13:25:28 -0400 |
| commit | c7cc130f97c2a0f390ba0e07e3aa048395636817 (patch) | |
| tree | 91e4e4b5b1d5c70b364dc7e530b424ea3e422b09 /src/data/things/flash.js | |
| parent | f2161a3fe8ff9b574f53156d08ca7853427be8e4 (diff) | |
data: concise-retouch remaining toplevel property descriptors
Diffstat (limited to 'src/data/things/flash.js')
| -rw-r--r-- | src/data/things/flash.js | 51 |
1 files changed, 10 insertions, 41 deletions
diff --git a/src/data/things/flash.js b/src/data/things/flash.js index efa99f36..738df937 100644 --- a/src/data/things/flash.js +++ b/src/data/things/flash.js @@ -1,6 +1,6 @@ export const FLASH_DATA_FILE = 'flashes.yaml'; -import {input} from '#composite'; +import {input, V} from '#composite'; import {sortFlashesChronologically} from '#sort'; import Thing from '#thing'; import {anyOf, isColor, isContentString, isDirectory, isNumber, isString} @@ -21,7 +21,6 @@ import {withPropertyFromObject} from '#composite/data'; import { exposeConstant, exposeDependency, - exposeDependencyOrContinue, exposeUpdateValueOrContinue, } from '#composite/control-flow'; @@ -99,12 +98,8 @@ export class Flash extends Thing { validate: input.value(isColor), }), - withPropertyFromObject({ - object: 'act', - property: input.value('color'), - }), - - exposeDependency({dependency: '#act.color'}), + withPropertyFromObject('act', V('color')), + exposeDependency('#act.color'), ], date: simpleDate(), @@ -153,21 +148,13 @@ export class Flash extends Thing { // Expose only - isFlash: [ - exposeConstant({ - value: input.value(true), - }), - ], + isFlash: exposeConstant(V(true)), commentatorArtists: commentatorArtists(), side: [ - withPropertyFromObject({ - object: 'act', - property: input.value('side'), - }), - - exposeDependency({dependency: '#act.side'}), + withPropertyFromObject('act', V('side')), + exposeDependency('#act.side'), ], }); @@ -297,18 +284,8 @@ export class FlashAct extends Thing { validate: input.value(isContentString), }), - withPropertyFromObject({ - object: 'side', - property: input.value('listTerminology'), - }), - - exposeDependencyOrContinue({ - dependency: '#side.listTerminology', - }), - - exposeConstant({ - value: input.value(null), - }), + withPropertyFromObject('side', V('listTerminology')), + exposeDependency('#side.listTerminology'), ], flashes: thingList({ @@ -322,11 +299,7 @@ export class FlashAct extends Thing { // Expose only - isFlashAct: [ - exposeConstant({ - value: input.value(true), - }), - ], + isFlashAct: exposeConstant(V(true)), }); static [Thing.findSpecs] = { @@ -381,11 +354,7 @@ export class FlashSide extends Thing { // Expose only - isFlashSide: [ - exposeConstant({ - value: input.value(true), - }), - ], + isFlashSide: exposeConstant(V(true)), }); static [Thing.yamlDocumentSpec] = { |