import { WeaveResult } from './Weave2'; import { Atom, AtomCardinality } from './Atom2'; /** * Describes information about the current status of a site. */ export interface SiteStatus { /** * The ID of the site. */ id: string; /** * The time that the site is currently at. */ time: number; } /** * Creates a new site. * @param id The ID to use. * @param time The time to use. */ export declare function newSite(id?: string, time?: number): SiteStatus; /** * Calculates the new site status from the current site status and result. * @param site The site. * @param result The result. */ export declare function updateSite(site: SiteStatus, result: WeaveResult): SiteStatus; export declare function calculateResultTime(site: SiteStatus, result: WeaveResult): number; /** * Merges the two sites together. * @param first The first site. * @param second The second site. */ export declare function mergeSites(first: SiteStatus, second: SiteStatus): SiteStatus; /** * Creates an atom for the given site. * @param site The site. * @param cause The cause of the new atom. * @param value The value to include with the atom. * @param priority The priority of the atom. */ export declare function createAtom(site: SiteStatus, cause: Atom, value: T, priority?: number, cardinality?: AtomCardinality): Atom; export declare function calculateTimeFromId(id: string, time: number, newId: string, newTime: number): number; //# sourceMappingURL=SiteStatus.d.ts.map