Updated documentation to new parenting format

This commit is contained in:
Thaum Rystra
2024-05-28 13:05:19 +02:00
parent 772e55ece5
commit b98a8b1ddf
12 changed files with 570 additions and 574 deletions

View File

@@ -1,11 +1,10 @@
import { chain, reverse, set } from 'lodash';
import { chain, reverse } from 'lodash';
import { TreeDoc, treeDocFields, Reference } from '/imports/api/parenting/ChildSchema';
import { getProperties } from '/imports/api/engine/loadCreatures';
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties';
import { Mongo } from 'meteor/mongo';
export function getCollectionByName(name: string): Mongo.Collection<TreeDoc> {
const collection: Mongo.Collection<TreeDoc> = Mongo.Collection.get(name)
const collection = Mongo.Collection.get<TreeDoc>(name)
if (!collection) {
throw new Meteor.Error('bad-collection-reference',
`Parent references collection ${name}, which does not exist`
@@ -119,7 +118,6 @@ export function filterToForest(
if (options.sort) {
collectionSort = {
...collectionSort,
// @ts-expect-error go home typescript you're drunk
...options.sort,
}
}