entangle.ts
Version:
A declarative, event-driven framework for orchestrating business logic in TypeScript & Node.js applications.
20 lines (19 loc) • 763 B
TypeScript
import { QueryBuilder } from '../event-horizon/builders/Query.builder';
/**
* Represents a lazy pointer to data within the EventHorizon.
* In our analogy, this is the radiation that "escapes" the horizon,
* carrying information about a past event.
*/
export declare class HawkingRadiation<T = unknown> {
private readonly queryBuilder;
private constructor();
/**
* Creates a new pointer to information from the EventHorizon.
* @param queryBuilder A configured QueryBuilder instance that specifies which data to fetch.
*/
static from<TData = unknown>(queryBuilder: QueryBuilder): HawkingRadiation<TData>;
/**
* Resolves the pointer and retrieves the actual data from the EventHorizon.
*/
get(): T | undefined;
}