import { ModelClass } from '../modelShared/BaseModelShared'; declare const Ref_base: import('..')._Model & { $storedValueType: string; $storedCreationValueType: string; }; }, never, never>; /** * A reference model base type. * Use `customRef` to create a custom ref constructor. */ export declare abstract class Ref extends Ref_base { protected abstract resolve(): T | undefined; /** * The object this reference points to, or `undefined` if the reference is currently invalid. */ get maybeCurrent(): T | undefined; /** * If the reference is currently valid. */ get isValid(): boolean; /** * The object this reference points to, or throws if invalid. */ get current(): T; /** * Ensures back references for this ref are up to date. * This only needs to be called if you need to get the most up to date * back references while both still inside an action and while the reference * is not a child of the same root than the target. */ abstract forceUpdateBackRefs(): void; } /** * @ignore */ export declare const customRefTypeSymbol: unique symbol; /** A ref constructor for custom refs */ export interface RefConstructor { (valueOrID: TE | string): Ref; refClass: ModelClass>; [customRefTypeSymbol]: T; } /** * Checks if a ref object is of a given ref type. * * @template T Referenced object type. * @param ref Reference object. * @param refType Reference type. * @returns `true` if it is of the given type, false otherwise. */ export declare function isRefOfType(ref: Ref, refType: RefConstructor): ref is Ref; export {};