« get me outta code hell

data: inputThingClass -> isThingClass, use global Thing symbols - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/wiki-data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-01-20 16:32:56 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-30 07:59:39 -0400
commit4739ac5fae824c6c985fca9ae34f6335f5c9c13e (patch)
tree571de29898c4702c2ddcf7661bd6f86f17bc650c /src/data/composite/wiki-data
parente57e540bd57ea9b25cf785327054f344347c40b1 (diff)
data: inputThingClass -> isThingClass, use global Thing symbols
Diffstat (limited to 'src/data/composite/wiki-data')
-rw-r--r--src/data/composite/wiki-data/index.js1
-rw-r--r--src/data/composite/wiki-data/inputThingClass.js23
2 files changed, 0 insertions, 24 deletions
diff --git a/src/data/composite/wiki-data/index.js b/src/data/composite/wiki-data/index.js
index d64930e1..3ccfa75d 100644
--- a/src/data/composite/wiki-data/index.js
+++ b/src/data/composite/wiki-data/index.js
@@ -5,7 +5,6 @@
 //
 
 export {default as exitWithoutContribs} from './exitWithoutContribs.js';
-export {default as inputThingClass} from './inputThingClass.js';
 export {default as inputWikiData} from './inputWikiData.js';
 export {default as withParsedCommentaryEntries} from './withParsedCommentaryEntries.js';
 export {default as withResolvedContribs} from './withResolvedContribs.js';
diff --git a/src/data/composite/wiki-data/inputThingClass.js b/src/data/composite/wiki-data/inputThingClass.js
deleted file mode 100644
index 5f2ca5a6..00000000
--- a/src/data/composite/wiki-data/inputThingClass.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// Please note that this input, used in a variety of #composite/wiki-data
-// utilities, is basically always a kludge. Any usage of it depends on
-// referencing Thing class values defined outside of the #composite folder.
-
-import {input} from '#composite';
-import {isFunction} from '#validators';
-
-// TODO: Kludge.
-import Thing from '../../things/thing.js';
-
-export default function inputThingClass() {
-  return input.staticValue({
-    validate(thingClass) {
-      isFunction(thingClass);
-
-      if (!Object.hasOwn(thingClass, Thing.referenceType)) {
-        throw new TypeError(`Expected a Thing constructor, missing Thing.referenceType`);
-      }
-
-      return true;
-    },
-  });
-}