diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-03-04 18:06:33 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-05-01 07:06:04 -0300 |
commit | 9466ed326cf6d36cbfa411ea5b8ef690c63b0c9c (patch) | |
tree | c9c10ef08363e432f403749b4a0ddac038837998 /src/data/things | |
parent | e904989c762a761227a1e6d7e67d1cfffa264978 (diff) |
cacheable-object: define properties on symbol, allow symbol props
This commit really does two separate things: * Move the definition for `propertyDescriptors` from that string key into `Symbol.for('CacheableObject.propertyDescriptors')` * Allow and support descriptors for key-based properties, by iterating over Reflect.ownKeys() instead of Object.entries()
Diffstat (limited to 'src/data/things')
-rw-r--r-- | src/data/things/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/data/things/index.js b/src/data/things/index.js index 3bf84091..01a8198b 100644 --- a/src/data/things/index.js +++ b/src/data/things/index.js @@ -2,10 +2,10 @@ import * as path from 'node:path'; import {fileURLToPath} from 'node:url'; import {openAggregate, showAggregate} from '#aggregate'; +import CacheableObject from '#cacheable-object'; import {logError} from '#cli'; import {compositeFrom} from '#composite'; import * as serialize from '#serialize'; - import Thing from '#thing'; import * as albumClasses from './album.js'; @@ -142,7 +142,7 @@ function evaluatePropertyDescriptors() { } } - constructor.propertyDescriptors = results; + constructor[CacheableObject.propertyDescriptors] = results; }, showFailedClasses(failedClasses) { |