import type { GraphCallbacks } from './spreadsheet_vertex_base'; import { SpreadsheetVertex } from './spreadsheet_vertex'; import { Color } from './vertex'; /** * adding a new leaf vertex type that actually does a calculation; * but it has no spreadsheet context (address) and by definition it * has no dependendents. * * this is intended for managing conditional formats, if they have * an expression. we only want to calculate these when necessary * (i.e. dependencies have updated, or they are volatile). * */ export declare class CalculationLeafVertex extends SpreadsheetVertex { static type: string; type: string; address: { row: number; column: number; }; /** * this type is currently only used for conditional formatting. * but that might change in the future. I want to identify what * it's used for so we can selectively prune them when necessary. */ use?: string; /** * flag, to reduce unecessary application. work in progress. this * indicates that we reached the calculation step. that means either * (1) dependencies changed, or (2) we were marked dirty in some global * operation, probably a full-recalc. * * (2) is a waste but we're still going to save some cycles here. if you * want you could add a state check like the other leaf vertex. */ updated: boolean; /** * leaf vertex defaults to black (i.e. tested) because leaf nodes cannot have * outbound edges. it is still possible to change this, because it's a property * and we can't override the set accessor, but making it an accessor in the * superclass just for this purpose is not worthwhile since regular vertices * should vastly outnumber leaves. */ color: Color; /** overrides calculate function */ Calculate(graph: GraphCallbacks): void; AddDependent(): void; }