import { Observer } from './runtime/observer'; /** * Extracts all Observers from the specified Instances * and returns them in the given order. * * ``` * const response = extractObservers([myState, myGroup, undefined]); * console.log(response); // See below * { * {value: Observer}, * {value: Observer, output: Observer}, * {} * } * ``` * * @internal * @param instances - Instances to extract the Observers from. */ export declare function extractObservers(instances: Array): Array<{ [key: string]: Observer | undefined; }>; /** * Extracts all Observers from the specified Instance. * * ``` * const response = extractObservers(myState); * console.log(response); // See below * { * value: Observer * } * ``` * * @internal * @param instances - Instance to extract the Observers from. */ export declare function extractObservers(instances: any): { [key: string]: Observer | undefined; }; /** * Extracts the most relevant Observers * from the specified Instance/s in array shape * and returns the extracted Observers in the given order. * * What type of Observer is extracted from an Instance, * depends on the specified `observerType`. * If no `observerType` is specified, the Observers found in the dependency * are selected in the following `observerType` order. * 1. `output` * 2. `value` * * @internal * @param instances - Instances in array shape to extract the Observers from. * @param observerType - Type of Observer to be extracted. */ export declare function extractRelevantObservers>(instances: X, observerType?: string): Array; /** * Extracts the most relevant Observers * from the specified Instance/s in object shape * and returns the extracted Observers in the given order. * * What type of Observer is extracted from an Instance, * depends on the specified `observerType`. * If no `observerType` is specified, the Observers found in the dependency * are selected in the following `observerType` order. * 1. `output` * 2. `value` * * @internal * @param instances - Instances in object shape to extract the Observers from. * @param observerType - Type of Observer to be extracted. */ export declare function extractRelevantObservers(instances: X, observerType?: string): { [key: string]: Observer | undefined; }; /** * Retrieves the module with the specified key/name identifier * and returns `null` if the module couldn't be found. * * @param moduleName - Key/Name identifier of the module to be retrieved. * @param error - Whether to print an error, when the module couldn't be retrieved. */ export declare function optionalRequire(moduleName: string, error?: boolean): PackageType | null; /** * Binds the specified Instance globally at the provided key identifier. * * Learn more about global bound instances: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis * * @public * @param key - Key/Name identifier of the specified Instance. * @param instance - Instance to be bound globally. * @param overwrite - When already an Instance exists globally at the specified key, * whether to overwrite it with the new Instance. */ export declare function globalBind(key: string, instance: any, overwrite?: boolean): boolean; /** * Returns a boolean indicating whether AgileTs is currently running on a server. * * @public */ export declare const runsOnServer: () => boolean;