@itwin/presentation-common
Version:
Common pieces for iModel.js presentation packages
32 lines • 969 B
TypeScript
/** @packageDocumentation
* @module Content
*/
import { Descriptor, DescriptorJSON } from "./Descriptor.js";
import { Item, ItemJSON } from "./Item.js";
/**
* Serialized [[Content]] JSON representation.
* @public
*/
export interface ContentJSON {
descriptor: DescriptorJSON;
contentSet: ItemJSON[];
}
/**
* A data structure that contains the [[Descriptor]] and a list of [[Item]]
* objects which are based on that descriptor.
*
* @public
*/
export declare class Content {
/** Descriptor used to create the content */
readonly descriptor: Descriptor;
/** Content items */
readonly contentSet: Item[];
/** Create a new [[Content]] instance */
constructor(descriptor: Descriptor, items: Item[]);
/** Serialize this object to JSON */
toJSON(): ContentJSON;
/** Deserialize [[Content]] from JSON */
static fromJSON(json: ContentJSON | string | undefined): Content | undefined;
}
//# sourceMappingURL=Content.d.ts.map