blob: b9021986e335edc7bbf3bddf4bc789b660fc581c (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 | import {input} from '#composite';
import {validateWikiData} from '#validators';
// TODO: This doesn't access a class's own ThingSubclass[Thing.referenceType]
// value because classes aren't initialized by when templateCompositeFrom gets
// called (see: circular imports). So the reference types have to be hard-coded,
// which somewhat defeats the point of storing them on the class in the first
// place...
export default function inputWikiData({
  referenceType = '',
  allowMixedTypes = false,
} = {}) {
  return input({
    validate: validateWikiData({referenceType, allowMixedTypes}),
    defaultValue: null,
  });
}
 |