sdj-esm
Version:
Self Described JSON - ESM
44 lines (43 loc) • 1.89 kB
TypeScript
import type { DescriptionJI, EntitySearch, FuncStrNumVoid, Info, ItemSearch, SdKeyProps } from "../core/interfaces.js";
import { ESDJ_CLASS } from "../core/statics.js";
import type { IDescriptionSdj, IEntitySdj, IItemSdj } from "./class-interfaces.js";
import { SdjEntity } from "./entity.js";
import { SdjItem } from "./item.js";
import type { ISdjHost, SdjJITypes } from "../global/global-interfaces.js";
export declare class SdjDescription implements IDescriptionSdj {
log: FuncStrNumVoid;
private _lexicons;
private _graph;
private _sdInfo;
private _lang;
private _items;
private _host;
constructor(refDescJI: DescriptionJI, requiredHost: ISdjHost);
get graph(): SdjEntity[];
set graph(inGraph: SdjEntity[]);
set items(inItems: IItemSdj[]);
get items(): SdjItem[];
get name(): string;
set name(name: string);
get sdInfo(): Info;
get lang(): string;
set lang(inStr: string);
get host(): ISdjHost;
searchEntities(searchEnt: EntitySearch): IEntitySdj[];
searchItems(searchItem: ItemSearch): IItemSdj[];
getEntity(entKeyNum: number | string): IEntitySdj | undefined;
getEntityRefs(entArray: number[] | string[]): IEntitySdj[];
calcSdKeyProps(entity: IEntitySdj): SdKeyProps;
getItem(itemKeyNum: number | string): IItemSdj | undefined;
getItemRefs(itemArray: number[] | string[]): IItemSdj[];
genJI(): DescriptionJI;
getEntityRefById(entId: number): IEntitySdj | undefined;
getItemsByEntity(entKeyNum: string | number): IItemSdj[];
verifyJIbyType(ji: SdjJITypes, jiType: ESDJ_CLASS, strict?: boolean): boolean;
private entityItemBuild;
private buildBaseItems;
private checkBase;
private strictLogError;
static VerifyJI(inDesc: DescriptionJI): void;
static IsEqual(alpha: SdjDescription | DescriptionJI, beta: SdjDescription | DescriptionJI): boolean;
}