mobx-keystone-mindreframer
Version:
A MobX powered state management solution based on data trees with first class support for Typescript, snapshots, patches and much more
20 lines (19 loc) • 683 B
TypeScript
import type { ModelClass } from "../modelShared/BaseModelShared";
import type { AnyType } from "../typeChecking/schemas";
import type { AnyDataModel } from "./BaseDataModel";
/**
* Associated data model metadata.
*/
export interface DataModelMetadata {
/**
* Associated data type for runtime checking (if any).
*/
dataType?: AnyType;
}
/**
* Returns the associated metadata for a data model instance or class.
*
* @param modelClassOrInstance Data model class or instance.
* @returns The associated metadata.
*/
export declare function getDataModelMetadata(modelClassOrInstance: AnyDataModel | ModelClass<AnyDataModel>): DataModelMetadata;