UNPKG

@itwin/ecschema-metadata

Version:

ECObjects core concepts in typescript

63 lines 2.58 kB
/** @packageDocumentation * @module Metadata */ import { InvertedUnitProps } from "../Deserialization/JsonProps"; import { SchemaItemType } from "../ECObjects"; import { LazyLoadedUnit, LazyLoadedUnitSystem } from "../Interfaces"; import { SchemaItem } from "./SchemaItem"; /** * An InvertedUnit is a specific type of Unit that describes the inverse of a single Unit whose dimensional derivation is unit-less. * @public @preview */ export declare class InvertedUnit extends SchemaItem { readonly schemaItemType: SchemaItemType; /** @internal */ static get schemaItemType(): SchemaItemType; private _invertsUnit?; private _unitSystem?; get invertsUnit(): LazyLoadedUnit | undefined; get unitSystem(): LazyLoadedUnitSystem | undefined; /** * Type guard to check if the SchemaItem is of type InvertedUnit. * @param item The SchemaItem to check. * @returns True if the item is a InvertedUnit, false otherwise. */ static isInvertedUnit(item?: SchemaItem): item is InvertedUnit; /** * Type assertion to check if the SchemaItem is of type InvertedUnit. * @param item The SchemaItem to check. * @returns The item cast to InvertedUnit if it is an InvertedUnit, undefined otherwise. * @internal */ static assertIsInvertedUnit(item?: SchemaItem): asserts item is InvertedUnit; /** * Save this InvertedUnit'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): InvertedUnitProps; /** @internal */ toXml(schemaXml: Document): Promise<Element>; fromJSONSync(invertedUnitProps: InvertedUnitProps): void; fromJSON(invertedUnitProps: InvertedUnitProps): Promise<void>; /** * @internal * Used for schema editing */ protected setInvertsUnit(invertsUnit: LazyLoadedUnit): void; /** * @internal * Used for schema editing */ protected setUnitSystem(unitSystem: LazyLoadedUnitSystem): void; } /** * @internal * An abstract class used for schema editing. */ export declare abstract class MutableInvertedUnit extends InvertedUnit { abstract setInvertsUnit(invertsUnit: LazyLoadedUnit): void; abstract setUnitSystem(unitSystem: LazyLoadedUnitSystem): void; abstract setDisplayLabel(displayLabel: string): void; } //# sourceMappingURL=InvertedUnit.d.ts.map