UNPKG

@itwin/ecschema-metadata

Version:

ECObjects core concepts in typescript

55 lines 2.13 kB
/** @packageDocumentation * @module Metadata */ import { PhenomenonProps } from "../Deserialization/JsonProps"; import { SchemaItemType } from "../ECObjects"; import { Schema } from "./Schema"; import { SchemaItem } from "./SchemaItem"; /** @public @preview */ export declare class Phenomenon extends SchemaItem { readonly schemaItemType: SchemaItemType; /** @internal */ static get schemaItemType(): SchemaItemType; private _definition; /** @internal */ constructor(schema: Schema, name: string); get definition(): string; /** * Save this Phenomenon's properties to an object for serializing to JSON. * @param standalone Serialization includes only this object (as opposed to the full schema). * @param includeSchemaVersion Include the Schema's version information in the serialized object. */ toJSON(standalone?: boolean, includeSchemaVersion?: boolean): PhenomenonProps; /** @internal */ toXml(schemaXml: Document): Promise<Element>; fromJSONSync(phenomenonProps: PhenomenonProps): void; fromJSON(phenomenonProps: PhenomenonProps): Promise<void>; /** * * @param definition * @internal */ protected setDefinition(definition: string): Promise<void>; /** * Type guard to check if the SchemaItem is of type Phenomenon. * @param item The SchemaItem to check. * @returns True if the item is a Phenomenon, false otherwise. */ static isPhenomenon(item?: SchemaItem): item is Phenomenon; /** * Type assertion to check if the SchemaItem is of type Phenomenon. * @param item The SchemaItem to check. * @returns The item cast to Phenomenon if it is a Phenomenon, undefined otherwise. * @internal */ static assertIsPhenomenon(item?: SchemaItem): asserts item is Phenomenon; } /** * @internal * An abstract class used for schema editing. */ export declare abstract class MutablePhenomenon extends Phenomenon { abstract setDefinition(definition: string): Promise<void>; abstract setDisplayLabel(displayLabel: string): void; } //# sourceMappingURL=Phenomenon.d.ts.map