/** * The id value, within a reference * @private */ export interface RefId { __do_not_use_this_refid: S; } /** * The type value, within a reference * @private */ export interface RefType { __do_not_use_this_reftype: T; } /** * A reference to an entity in a registry * @public */ export declare type Ref = [RefType, RefId]; /** * Get a reference type for a registry * @public */ export declare type RefFor = RefRegistry[K]; /** * Get the names of types present in a RefRegistry * @public */ export declare type RefTypes = keyof RefRegistry; /** * Any reference possible for a given RefRegistry * @public */ export declare type AnyRef = RefRegistry[RefTypes]; /** * Check to see whether a value is a reference * @param thing value to check * @public */ export declare function isRef>(thing?: R): thing is R; export declare function isRef(thing: any, refTyp: K): thing is Ref; /** * Create a new reference * @param type name of the reference type * @param id registry-unique of the reference * @returns the new reference * @public */ export declare function createRef>(type: K, id: string): Ref; /** * Get a reference's type name * @param ref the reference * @public */ export declare function refType(ref: Ref): K; /** * Get a reference's ID * @param ref the reference * @public */ export declare function refId(ref: Ref): S; /** * A function that turns a reference into a resolved entity * @public */ export declare type RefResolver = (ref?: Ref) => EntityMap[K] | undefined; //# sourceMappingURL=ref.d.ts.map