UNPKG

@metadev/essential-core

Version:

Core SDK Metamodeling Framework. Essential

53 lines (51 loc) 1.18 kB
declare enum ErrorType { None = 0, Info = 1, Warning = 2, Error = 3 } interface Location { filename: string; start: Position; end: Position; } interface Position { line: number; col: number; } interface IError { message: string; element?: ModelElement; type: ErrorType; location: Location; } declare enum VisitMode { PreOrder = 0, PostOrder = 1 } interface MetaInfo { id: string; model?: Model; parent?: ModelElement; location?: Location; } interface ModelElement { _meta: MetaInfo; getId(): string; getTypeName(): string; toString(): string; toJson(): string; toEssential(): string; validate(): IError[]; visit(visitMode: VisitMode, action: (el: ModelElement) => void): void; identity(): unknown; hashCodeElement(): number; hashCode(): number; sameConcept(b: ModelElement | null | undefined): boolean; equals(b: ModelElement): boolean; } interface Model extends ModelElement { modelName: string; version: string; } export { ErrorType, type IError, type Location, type MetaInfo, type Model, type ModelElement, type Position, VisitMode };