import { IEpistemology, } from '../epistemology/IEpistemology'; import { FindModelArgs, } from '../querying/FindModelArgs'; import { IModel, } from '../models/IModel'; import { IModelConstructorArgs, } from '../models/IModelConstructorArgs'; import { INamed, } from '../../interfaces/INamed'; import { ISerializedWorld, } from './ISerializedWorld'; import { ITag, } from '../../tags/ITag'; import { ModelType, } from '../models/ModelType'; import { OnticTypes, } from '../ontology/OnticTypes'; import { Tag, } from '../../tags/Tag'; import { TypedModelInterfaces, } from '../models/TypedModelInterfaces'; export interface IWorld extends INamed { readonly being: null; /* Worlds may "possess" generic and/or global thoughts but may not be * "aware." */ readonly knowledge: IEpistemology; readonly models: Readonly< Record> >; readonly tags: readonly ITag[]; readonly type: symbol; readonly addModel: < Type extends ModelType, Being extends OnticTypes = any, Knowledge extends ModelType = any, >( args: IModelConstructorArgs, ctor?: new ( world: IWorld, args: IModelConstructorArgs, ) => IModel, ) => ( Type extends keyof TypedModelInterfaces ? TypedModelInterfaces[Type] : IModel ); readonly addTag: (tag: Tag) => void; readonly children: () => readonly IModel[]; readonly clone: (name: string) => IWorld; readonly descendants: () => readonly IModel[]; readonly destroy: () => void; readonly finalize: (self: IWorld) => void; readonly find: ( args: FindModelArgs, ) => IModel | null; readonly findAll: ( args: FindModelArgs, ) => readonly IModel[]; readonly findAllGenerator: ( args: FindModelArgs, ) => IterableIterator>; readonly getTag: (toSearch: Tag) => any; readonly initialize: (self: IWorld) => void; readonly serialize: ( self: IWorld, spaces?: number, ) => string; readonly serializeToObject: (self: IWorld) => ISerializedWorld; readonly removeModel: ( model: IModel, ) => void; readonly removeTag: (key: Tag) => void; }