API reference
@searsuite/sear-domain-formula-engine
Host-neutral formula values, evaluation contracts, registries, references, and external-service boundaries.
175 exportsderived from source
- namespaceIAggregationCachesource ↗
-
IAggregationCache: unknownvariablesymbol symbol: typeof symbol - namespaceIDependencyGraphsource ↗
-
IDependencyGraph: unknownvariablesymbol symbol: typeof symbol - namespaceIFormulaCalculationTraceProvidersource ↗
-
IFormulaCalculationTraceProvider: unknownvariablesymbol symbol: typeof symbolDI token for resolving IFormulaCalculationTraceProvider.
- namespaceIFormulaDateSystemProvidersource ↗
-
IFormulaDateSystemProvider: unknownvariablesymbol symbol: typeof symbol - namespaceIFormulaEvaluatorsource ↗
-
IFormulaEvaluator: unknownvariablesymbol symbol: typeof symbol - namespaceIFormulaExternalServiceProvidersource ↗
-
IFormulaExternalServiceProvider: unknownvariablesymbol symbol: symbol - namespaceIFormulaIterationSettingsProvidersource ↗
-
IFormulaIterationSettingsProvider: unknownvariablesymbol symbol: typeof symbol - namespaceIFormulaLocaleProvidersource ↗
-
IFormulaLocaleProvider: unknownvariablesymbol symbol: typeof symbolDI token for resolving IFormulaLocaleProvider.
- namespaceIFormulaParsersource ↗
-
IFormulaParser: unknownvariablesymbol symbol: typeof symbol - namespaceIFormulaResultProvidersource ↗
-
IFormulaResultProvider: unknownvariablesymbol symbol: typeof symbolDI token for resolving IFormulaResultProvider.
- namespaceIFormulaRichResultProvidersource ↗
-
IFormulaRichResultProvider: unknownvariablesymbol symbol: typeof symbol - namespaceIFormulaSourceProvidersource ↗
-
IFormulaSourceProvider: unknownvariablesymbol symbol: typeof symbolDI token for resolving IFormulaSourceProvider.
- namespaceIFormulaStatusProvidersource ↗
-
IFormulaStatusProvider: unknownvariablesymbol symbol: typeof symbolDI token for resolving IFormulaStatusProvider.
- namespaceIFormulaTextServiceProvidersource ↗
-
IFormulaTextServiceProvider: unknownvariablesymbol symbol: typeof symbolDI token for host adapters that supply text-formula services.
- namespaceIFunctionRegistrysource ↗
-
IFunctionRegistry: unknownvariablesymbol symbol: typeof symbol - classFormulaFunctionArgumentssource ↗
-
class FormulaFunctionArgumentsPublic coercion and argument-reading SDK for built-in and third-party formula functions.
constructorconstructor FormulaFunctionArguments(args: readonly FormulaArg[], context: EvalContext): FormulaFunctionArgumentsargs: readonly FormulaArg[]context: EvalContext
methodboolean boolean(index: number, fallback?: boolean): boolean | FormulaErrorReads a boolean argument from booleans, numbers, or TRUE/FALSE text.
index: numberfallback: boolean
methodinteger integer(index: number, fallback?: number): number | FormulaErrorReads a truncated integer argument.
index: numberfallback: number
methodisMissing isMissing(index: number): booleanReturns whether an argument was omitted.
index: number
methodnumber number(index: number, fallback?: number): number | FormulaErrorReads and coerces one argument to a finite number.
index: numberfallback: number
methodreference reference(index: number): FormulaError | ResolvedFormulaRangeReads a reference argument without materializing it.
index: number
methodtext text(index: number, fallback?: string): string | FormulaErrorReads and coerces one argument to text using spreadsheet-compatible scalar rules.
index: numberfallback: string
methodvalue value(index: number): FormulaValueReads one scalar argument while preserving formula errors.
index: number
- interfaceCellChangesource ↗
-
interface CellChangeValue transition for one formula-visible cell.
- interfaceEvalContextsource ↗
-
interface EvalContextHost-provided services and data readers used during formula evaluation.
propertyaggregationCache aggregationCache?: IAggregationCachepropertyarrayFormulaMode arrayFormulaMode?: "dynamic" | "legacy"propertybudget budget?: FormulaEvaluationBudgetpropertycurrentCell currentCell?: FormulaCellPositionpropertydateSystem dateSystem?: FormulaDateSystempropertydateTimeLocale dateTimeLocale?: FormulaDateTimeLocalepropertyexternalServices externalServices?: FormulaExternalServiceReaderpropertyformulaSource formulaSource?: IFormulaSourceProviderpropertylanguageService languageService?: FormulaLanguageServicepropertymetadata metadata?: FormulaMetadataReaderpropertyphoneticReader phoneticReader?: FormulaPhoneticReaderpropertyreferenceResolver referenceResolver?: FormulaReferenceResolverpropertyregisterDynamicDependency registerDynamicDependency?: FormulaDynamicDependencyRegistrarpropertyscope scope?: FormulaEvaluationScopepropertytextLocale textLocale?: FormulaTextLocalepropertyxmlXPath xmlXPath?: XmlXPathEvaluatormethodcurrentDateTime currentDateTime(): numbermethodevaluateArrayFormula evaluateArrayFormula(ast: FormulaAST, scope?: FormulaEvaluationScope): FormulaValueast: FormulaASTscope: FormulaEvaluationScope
methodevaluateFormula evaluateFormula(ast: FormulaAST, scope?: FormulaEvaluationScope): FormulaValueast: FormulaASTscope: FormulaEvaluationScope
methodforFormulaCell forFormulaCell(cell: FormulaCellPosition): EvalContextcell: FormulaCellPosition
methodgetCellValue getCellValue(row: number, col: number): FormulaValuerow: numbercol: number
methodgetSheetShape getSheetShape(): [rowCount: number, colCount: number]methodgetWorkbookCellValue getWorkbookCellValue(sheetName: string, row: number, col: number): FormulaValuesheetName: stringrow: numbercol: number
methodisCellInBounds isCellInBounds(row: number, col: number): booleanrow: numbercol: number
methodisCellOccupied isCellOccupied(row: number, col: number): booleanrow: numbercol: number
methoditerateRange iterateRange(startRow: number, startCol: number, endRow: number, endCol: number): Iterable<FormulaValue>startRow: numberstartCol: numberendRow: numberendCol: number
methoditerateRangeCells iterateRangeCells(startRow: number, startCol: number, endRow: number, endCol: number): Iterable<FormulaRangeCell>startRow: numberstartCol: numberendRow: numberendCol: number
methoditerateWorkbookRange iterateWorkbookRange(sheetName: string, startRow: number, startCol: number, endRow: number, endCol: number): Iterable<FormulaValue>sheetName: stringstartRow: numberstartCol: numberendRow: numberendCol: number
methoditerateWorkbookRangeCells iterateWorkbookRangeCells(sheetName: string, startRow: number, startCol: number, endRow: number, endCol: number): Iterable<FormulaRangeCell>sheetName: stringstartRow: numberstartCol: numberendRow: numberendCol: number
methodrandom random(): numbermethodreadReference readReference(reference: ResolvedFormulaRange): FormulaValuereference: ResolvedFormulaRange
- interfaceEvalResultsource ↗
-
interface EvalResultOne result produced during formula batch evaluation.
- interfaceFormulaAddInRegistrationRequestsource ↗
-
interface FormulaAddInRegistrationRequestIdentifies one procedure exposed by a host-managed add-in.
- interfaceFormulaAddInServicesource ↗
-
interface FormulaAddInServiceHost-owned native add-in boundary used by CALL and REGISTER.ID. Implementations must enforce authorization and isolation outside formula evaluation.
methodcall call(request: FormulaAddInCall): FormulaServiceCacheResult<FormulaValue>request: FormulaAddInCall
methodresolveRegistration resolveRegistration(request: FormulaAddInRegistrationRequest): FormulaServiceCacheResult<number>request: FormulaAddInRegistrationRequest
- interfaceFormulaBatchFlushedEventsource ↗
-
interface FormulaBatchFlushedEvent extends FormulaCalculationTraceEventBaseEvent emitted when one batch of derived results is flushed.
propertygeneration readonly generation: numberpropertypendingCount readonly pendingCount: numberpropertyresults readonly results: readonly FormulaFlushedCellResult[]propertytype readonly type: "formula.batchFlushed" - interfaceFormulaCalculationTraceEventBasesource ↗
-
interface FormulaCalculationTraceEventBaseShared metadata attached to every calculation trace event.
propertysequence readonly sequence: number - interfaceFormulaCellMetadatasource ↗
-
interface FormulaCellMetadataRead-only cell facts consumed by information formulas.
propertyformula readonly formula?: stringpropertylocked readonly locked?: booleanpropertynumberFormat readonly numberFormat?: stringpropertyreference readonly reference: FormulaMetadataCellReferencepropertysource readonly source: FormulaCellSourcepropertyvalue readonly value: FormulaValuepropertywidth readonly width?: number - interfaceFormulaCellPositionsource ↗
-
interface FormulaCellPositionPosition of the formula currently being evaluated.
- interfaceFormulaCellStatussource ↗
-
interface FormulaCellStatusRead-only formula status snapshot for one sheet cell.
propertycol readonly col: numberpropertydependencies readonly dependencies: readonly Dependency[]propertydependents readonly dependents: readonly number[]propertydirty readonly dirty: booleanpropertyerrorCode readonly errorCode: FormulaErrorCode | undefinedpropertyformula readonly formula: string | undefinedpropertyisFormulaCell readonly isFormulaCell: booleanpropertyresult readonly result: FormulaValue | undefinedpropertyrow readonly row: number - interfaceFormulaCubeMemberValuesource ↗
-
interface FormulaCubeMemberValueCUBE member or tuple identity with its display caption.
propertycaption readonly caption: stringpropertyconnection readonly connection: stringpropertyexpression readonly expression: stringpropertykind readonly kind: "cube-member" - interfaceFormulaCubeServicesource ↗
-
interface FormulaCubeServiceHost-owned synchronous OLAP cache view. Loading and connection I/O stay outside evaluation.
methodload load(query: FormulaCubeQuery): Promise<void>query: FormulaCubeQuery
methodread read(query: FormulaCubeQuery): FormulaServiceCacheResult<FormulaCubeResult>query: FormulaCubeQuery
methodsubscribeInvalidation subscribeInvalidation(listener: (): void): (): voidlistener: (): void
- interfaceFormulaCubeSetValuesource ↗
-
interface FormulaCubeSetValueCUBE set identity with its display caption.
propertycaption readonly caption: stringpropertyconnection readonly connection: stringpropertycount readonly count?: numberpropertyexpression readonly expression: stringpropertykind readonly kind: "cube-set" - interfaceFormulaDateTimeLocalesource ↗
-
interface FormulaDateTimeLocaleLocale-specific date/time parsing and formatting used by formulas.
propertylocale readonly locale: stringpropertysymbols readonly symbols?: FormulaDateTimeSymbolsmethodformatDateTime formatDateTime(serial: number, pattern?: string): stringserial: numberpattern: string
methodparseDateTime parseDateTime(value: unknown, options?: FormulaDateTimeParseOptions): FormulaDateTimeParseResult | nullvalue: unknownoptions: FormulaDateTimeParseOptions
- interfaceFormulaDateTimeMeridiemSymbolsource ↗
-
interface FormulaDateTimeMeridiemSymbolLocale-specific AM/PM token.
- interfaceFormulaDateTimeMonthSymbolsource ↗
-
interface FormulaDateTimeMonthSymbolLocale-specific month-name token.
- interfaceFormulaDateTimeParseOptionssource ↗
-
interface FormulaDateTimeParseOptionsOptions passed to locale-aware formula date/time parsers.
propertycurrentDateTime readonly currentDateTime?: number - interfaceFormulaDateTimeParseResultsource ↗
-
interface FormulaDateTimeParseResultParsed Excel-compatible date/time serial and source components.
- interfaceFormulaDateTimeSymbolssource ↗
-
interface FormulaDateTimeSymbolsLocale-specific symbols consumed by the shared date/time parser.
- interfaceFormulaDateTimeUnitSymbolssource ↗
-
interface FormulaDateTimeUnitSymbolsLocale-specific date-unit tokens.
- interfaceFormulaDependenciesChangedEventsource ↗
-
interface FormulaDependenciesChangedEvent extends FormulaCalculationTraceEventBaseEvent emitted when one formula cell's dependency edges change.
propertycol readonly col: numberpropertydependencies readonly dependencies: readonly Dependency[]propertykey readonly key: numberpropertypreviousDependencies readonly previousDependencies: readonly Dependency[]propertyrow readonly row: numberpropertytype readonly type: "formula.dependenciesChanged" - interfaceFormulaDirectAddInCallsource ↗
-
interface FormulaDirectAddInCall extends FormulaAddInRegistrationRequestInvokes a host-authorized procedure by module signature.
- interfaceFormulaEnvironmentMetadatasource ↗
-
interface FormulaEnvironmentMetadataOptional host facts exposed without leaking platform-native APIs.
propertycalculationMode readonly calculationMode?: "Automatic" | "Manual"propertydirectory readonly directory?: stringpropertyoperatingSystem readonly operatingSystem?: stringpropertysystem readonly system?: stringpropertyversion readonly version?: string - interfaceFormulaErrorsource ↗
-
interface FormulaErrorSerializable formula error value.
- interfaceFormulaErrorChangedEventsource ↗
-
interface FormulaErrorChangedEvent extends FormulaCalculationTraceEventBaseEvent emitted when one formula cell's error code changes.
propertycol readonly col: numberpropertyerrorCode readonly errorCode: FormulaErrorCode | undefinedpropertygeneration readonly generation: numberpropertykey readonly key: numberpropertypreviousErrorCode readonly previousErrorCode: FormulaErrorCode | undefinedpropertyrow readonly row: numberpropertytype readonly type: "formula.errorChanged" - interfaceFormulaEvaluationBudgetsource ↗
-
interface FormulaEvaluationBudgetHost-neutral execution budget for formula evaluation.
propertymaxSteps readonly maxSteps: numbermethodconsumeStep consumeStep(): boolean - interfaceFormulaEvaluationScopesource ↗
-
interface FormulaEvaluationScopeLexical scope for formula-local names.
- interfaceFormulaExternalServiceDefinitionsource ↗
-
interface FormulaExternalServiceDefinition<T>Typed identity for one synchronous service view consumed by formulas.
propertyid readonly id: stringpropertysubscribeInvalidation readonly subscribeInvalidation?: (service: T, listener: (): void): (): voidpropertytype readonly type?: T - interfaceFormulaExternalServiceReadersource ↗
-
interface FormulaExternalServiceReaderRead-only external-service view exposed during formula evaluation.
methodget get<T>(definition: FormulaExternalServiceDefinition<T>): T | undefineddefinition: FormulaExternalServiceDefinition<T>
- interfaceFormulaFlushedCellResultsource ↗
-
interface FormulaFlushedCellResultOne cell result written during a formula batch flush.
- interfaceFormulaFunctionsource ↗
-
interface FormulaFunctionRuntime contract implemented by built-in and third-party formula functions.
propertyallowReferencesOutsideHostShape allowReferencesOutsideHostShape?: booleanPass reference coordinates to the function even when outside the host's materialized sheet shape.
propertydescriptor descriptor?: FormulaFunctionDescriptorpropertylazy lazy?: booleanpropertyname name: stringpropertynamedConstants namedConstants?: Readonly<Record<string, FormulaValue>>propertyvolatile volatile?: booleanmethodevaluate evaluate(args: FormulaArg[], context: EvalContext): FormulaValueargs: FormulaArg[]context: EvalContext
methodincrementalUpdate incrementalUpdate(prevResult: FormulaValue, changedCells: CellChange[], args: FormulaAST[], context: EvalContext): FormulaValueprevResult: FormulaValuechangedCells: CellChange[]args: FormulaAST[]context: EvalContext
- interfaceFormulaFunctionDescriptorsource ↗
-
interface FormulaFunctionDescriptorVersioned presentation-neutral formula function metadata.
propertycategory readonly category: stringpropertyexample readonly example: stringpropertyexternalServices readonly externalServices?: readonly string[]propertymaxArguments readonly maxArguments?: numberAuthoritative upper argument bound. Omit for variadic or illustrative signatures.
propertyminArguments readonly minArguments?: numberAuthoritative lower argument bound. Omit when a signature is illustrative only.
propertyparameters readonly parameters: readonly FormulaFunctionParameterDescriptor[]propertyreturnKind readonly returnKind?: "array" | "scalar" | "scalar-or-array"propertysummary readonly summary: stringpropertyversion readonly version: 1 - interfaceFormulaFunctionParameterDescriptorsource ↗
-
interface FormulaFunctionParameterDescriptorOne function parameter exposed to formula-authoring tools.
propertyaccepts readonly accepts?: readonly FormulaFunctionArgumentKind[]propertydescription readonly description: stringpropertyname readonly name: stringpropertyoptional readonly optional?: booleanpropertyrepeating readonly repeating?: boolean - interfaceFormulaGoogleRequestsource ↗
-
interface FormulaGoogleRequestSerializable request used by host-backed Google-compatible formulas.
propertyarguments readonly arguments: readonly FormulaValue[]propertyfunctionName readonly functionName: string - interfaceFormulaGoogleServicesource ↗
-
interface FormulaGoogleServiceSynchronous cache view. Hosts load values outside formula evaluation.
methodread read(request: FormulaGoogleRequest): FormulaServiceCacheResult<FormulaValue>request: FormulaGoogleRequest
methodsubscribeInvalidation subscribeInvalidation(listener: (): void): (): voidlistener: (): void
- interfaceFormulaHyperlinkResultsource ↗
-
interface FormulaHyperlinkResultHost-neutral hyperlink result projected by a formula renderer.
- interfaceFormulaHyperlinkServicesource ↗
-
interface FormulaHyperlinkServiceHost policy for validating and normalizing hyperlink targets.
methodnormalizeTarget normalizeTarget(target: string): string | undefinedtarget: string
- interfaceFormulaImageResourcesource ↗
-
interface FormulaImageResourceHost-neutral image resource returned by an image loader.
propertyassetId readonly assetId: stringpropertyintrinsicHeight readonly intrinsicHeight?: numberpropertyintrinsicWidth readonly intrinsicWidth?: numberpropertysource readonly source: string - interfaceFormulaImageResultsource ↗
-
interface FormulaImageResultHost-neutral image result projected by a formula renderer.
- interfaceFormulaImageServicesource ↗
-
interface FormulaImageServiceHost-owned image loader used by IMAGE.
methodload load(source: string): Promise<void>source: string
methodread read(source: string): FormulaServiceCacheResult<FormulaImageResource>source: string
methodsubscribeInvalidation subscribeInvalidation(listener: (): void): (): voidlistener: (): void
- interfaceFormulaIterationSettingssource ↗
-
interface FormulaIterationSettingsPer-editor calculation policy for circular formula dependencies.
propertyenabled enabled: booleanpropertymaxChange maxChange: numberpropertymaxIterations maxIterations: number - interfaceFormulaLanguageServicesource ↗
-
interface FormulaLanguageServiceSynchronous cache view for host-managed language services.
propertydefaultTargetLanguage readonly defaultTargetLanguage?: stringmethoddetectLanguage detectLanguage(text: string): FormulaLanguageServiceResulttext: string
methodsubscribeInvalidation subscribeInvalidation(listener: (): void): (): voidlistener: (): void
methodtranslate translate(text: string, sourceLanguage: string | undefined, targetLanguage: string): FormulaLanguageServiceResulttext: stringsourceLanguage: string | undefinedtargetLanguage: string
- interfaceFormulaMetadataCellReferencesource ↗
-
interface FormulaMetadataCellReferencePlatform-neutral identity of one cell visible to formula evaluation.
- interfaceFormulaMetadataReadersource ↗
-
interface FormulaMetadataReaderHost-owned, synchronous metadata projection consumed during formula evaluation.
methodreadCell readCell(reference: FormulaMetadataCellReference): FormulaCellMetadata | undefinedreference: FormulaMetadataCellReference
methodreadEnvironment readEnvironment(): FormulaEnvironmentMetadata | undefinedmethodreadWorkbook readWorkbook(): FormulaWorkbookMetadata | undefined - interfaceFormulaPhoneticReadersource ↗
-
interface FormulaPhoneticReaderReads persisted phonetic text without coupling formulas to a cell schema.
methodgetCellPhonetic getCellPhonetic(row: number, col: number): string | undefinedrow: numbercol: number
methodgetWorkbookCellPhonetic getWorkbookCellPhonetic(sheetName: string, row: number, col: number): string | undefinedsheetName: stringrow: numbercol: number
- interfaceFormulaPivotDataQuerysource ↗
-
interface FormulaPivotDataQueryQuery passed to a host-owned pivot data provider.
propertydataField readonly dataField: stringpropertyfilters readonly filters: readonly { field: string; item: string }[]propertypivotReference readonly pivotReference: string - interfaceFormulaPivotDataServicesource ↗
-
interface FormulaPivotDataServiceHost service used by GETPIVOTDATA.
methodgetData getData(query: FormulaPivotDataQuery): FormulaValuequery: FormulaPivotDataQuery
- interfaceFormulaRangeCellsource ↗
-
interface FormulaRangeCellOne range cell with optional visibility and source metadata.
- interfaceFormulaRangeMovesource ↗
-
interface FormulaRangeMoveInclusive source bounds and displacement for reference-preserving cell movement.
propertycolumnOffset readonly columnOffset: numberpropertyend readonly end: readonly [number, number]propertyincludeUnqualified readonly includeUnqualified?: booleanFalse when inspecting qualified references from a different sheet.
propertyrowOffset readonly rowOffset: numberpropertysheetName readonly sheetName?: stringWhen supplied, qualified references to this sheet also follow the move.
propertystart readonly start: readonly [number, number] - interfaceFormulaRecalculationCompletedEventsource ↗
-
interface FormulaRecalculationCompletedEvent extends FormulaCalculationTraceEventBaseEvent emitted when one recalculation generation completes.
propertybatchCount readonly batchCount: numberpropertyflushedCellCount readonly flushedCellCount: numberpropertygeneration readonly generation: numberpropertypendingCount readonly pendingCount: 0propertytype readonly type: "formula.recalculationCompleted" - interfaceFormulaReferenceArgumentsource ↗
-
interface FormulaReferenceArgumentA function argument that intentionally retains reference identity.
- interfaceFormulaReferenceResolutionOptionssource ↗
-
interface FormulaReferenceResolutionOptionsOptions used when resolving text, names, or dynamic references.
propertycurrentCell readonly currentCell?: FormulaCellPositionpropertystyle readonly style?: FormulaReferenceStyle - interfaceFormulaReferenceResolversource ↗
-
interface FormulaReferenceResolverHost-owned resolver for names and text references.
methodresolve resolve(referenceText: string, options?: FormulaReferenceResolutionOptions): FormulaError | ResolvedFormulaRangereferenceText: stringoptions: FormulaReferenceResolutionOptions
- interfaceFormulaReferenceValuesource ↗
-
interface FormulaReferenceValueReference identity returned by reference-preserving functions.
- interfaceFormulaRegisteredAddInCallsource ↗
-
interface FormulaRegisteredAddInCallInvokes a procedure previously resolved by REGISTER.ID.
propertyarguments readonly arguments: readonly FormulaValue[]propertykind readonly kind: "registered"propertyregistrationId readonly registrationId: number - interfaceFormulaRtdKeysource ↗
-
interface FormulaRtdKeyStable key used to read one RTD subscription.
- interfaceFormulaRtdServicesource ↗
-
interface FormulaRtdServiceHost-owned RTD service.
methodload load(key: FormulaRtdKey): Promise<void>key: FormulaRtdKey
methodread read(key: FormulaRtdKey): FormulaServiceCacheResult<FormulaValue>key: FormulaRtdKey
methodsubscribeInvalidation subscribeInvalidation(listener: (): void): (): voidlistener: (): void
- interfaceFormulaSheetMetadatasource ↗
-
interface FormulaSheetMetadataStable workbook sheet identity and one-based display position.
- interfaceFormulaStockHistoryRequestsource ↗
-
interface FormulaStockHistoryRequestNormalized request key for a historical market-data lookup.
- interfaceFormulaStockHistoryServicesource ↗
-
interface FormulaStockHistoryServiceSynchronous view over historical market data loaded outside formula evaluation.
methodread read(request: FormulaStockHistoryRequest): FormulaServiceCacheResult<FormulaError | FormulaValue[][]>request: FormulaStockHistoryRequest
methodsubscribeInvalidation subscribeInvalidation(listener: (): void): (): voidlistener: (): void
- interfaceFormulaStructureMoveOptionssource ↗
-
interface FormulaStructureMoveOptionsSelects the reference namespace rewritten by a structure permutation.
propertyincludeUnqualified readonly includeUnqualified?: booleanpropertysheetName readonly sheetName?: string - interfaceFormulaTextsource ↗
-
interface FormulaTextText value carrying an explicit numeric coercion policy.
propertykind kind: "text"propertynumericCoercion numericCoercion: "allow" | "deny"propertyvalue value: string - interfaceFormulaTextLocalesource ↗
-
interface FormulaTextLocaleLocale-specific byte and width transforms for legacy text functions.
propertycurrencySymbol readonly currencySymbol?: stringpropertylocale readonly locale: stringmethodbyteLength byteLength(text: string): numbertext: string
methodcalculationModeLabel calculationModeLabel(mode: "Automatic" | "Manual"): stringmode: "Automatic" | "Manual"
methodcharacterCode characterCode(text: string): numbertext: string
methodcharacterFromCode characterFromCode(code: number): string | undefinedcode: number
methodcompareText compareText(left: string, right: string): numberleft: stringright: string
methodfindByBytes findByBytes(text: string, search: string, startByte: number, caseSensitive: boolean): numbertext: stringsearch: stringstartByte: numbercaseSensitive: boolean
methodformatCurrency formatCurrency(number: number, decimals: number): stringnumber: numberdecimals: number
methodreplaceByBytes replaceByBytes(text: string, startByte: number, byteLength: number, replacement: string): stringtext: stringstartByte: numberbyteLength: numberreplacement: string
methodsliceByBytes sliceByBytes(text: string, startByte: number, byteLength: number): stringtext: stringstartByte: numberbyteLength: number
methodtoFullWidth toFullWidth(text: string): stringtext: string
methodtoHalfWidth toHalfWidth(text: string): stringtext: string
methodtoJis toJis(text: string): stringtext: string
- interfaceFormulaTupleValuesource ↗
-
interface FormulaTupleValueTuple expression preserving the identity of its items.
- interfaceFormulaWebServicesource ↗
-
interface FormulaWebServiceSynchronous view of HTTP response text loaded explicitly by the host.
methodread read(url: string): FormulaServiceCacheResult<string | FormulaError>url: string
methodsubscribeInvalidation subscribeInvalidation(listener: (): void): (): voidlistener: (): void
- interfaceFormulaWorkbookMetadatasource ↗
-
interface FormulaWorkbookMetadataRead-only workbook facts consumed by information formulas.
propertycurrentSheetId readonly currentSheetId?: stringpropertycurrentSheetName readonly currentSheetName?: stringpropertysheets readonly sheets: readonly FormulaSheetMetadata[] - interfaceIAggregationCachesource ↗
-
interface IAggregationCachePublic contract for IAggregationCache.
methodclear clear(): voidClears all caches.
methodenforceCommandBoundary enforceCommandBoundary(isCommandExecuting: (): boolean): voidBinds cache writes to the owning editor command dispatch after initialization.
isCommandExecuting: (): boolean
methodgetCount getCount(startRow: number, startCol: number, endRow: number, endCol: number): numberGets the COUNT for a range, meaning the number of numeric cells.
Uses the same cache and incremental strategy as getSum.
startRow: numberstartCol: numberendRow: numberendCol: number
methodgetSum getSum(startRow: number, startCol: number, endRow: number, endCol: number): numberGets the SUM for a range.
Cache hit returns directly in O(1). Cache miss requires a full O(N) scan on the first call.
Called by FormulaEvaluator while evaluating SUM, not exposed directly to users.
startRow: numberStart row (0-based).
startCol: numberStart column (0-based).
endRow: numberEnd row (0-based).
endCol: numberEnd column (0-based).
methodonCellChanged onCellChanged(row: number, col: number, oldVal: FormulaValue, newVal: FormulaValue): voidNotifies the cache that one cell value changed.
Finds every cached range covering the cell and updates incrementally:
- newSum = oldSum - oldVal + newVal
- FormulaError oldVal/newVal values are treated as non-numeric and do not affect sum.
row: numberChanged row (0-based).
col: numberChanged column (0-based).
oldVal: FormulaValuePrevious value.
newVal: FormulaValueNew value.
methodonStructureChanged onStructureChanged(): voidNotifies the cache that rows or columns were inserted or deleted.
Structural changes invalidate all range caches because range coordinates have changed, so the cache must be cleared.
methodsetCount setCount(startRow: number, startCol: number, endRow: number, endCol: number, count: number): voidStores a successfully calculated COUNT for a rectangular range.
startRow: numberstartCol: numberendRow: numberendCol: numbercount: number
methodsetSum setSum(startRow: number, startCol: number, endRow: number, endCol: number, sum: number): voidStores a successfully calculated SUM for a rectangular range.
startRow: numberstartCol: numberendRow: numberendCol: numbersum: number
- interfaceIDependencyGraphsource ↗
-
interface IDependencyGraphPublic contract for IDependencyGraph.
propertypendingCount readonly pendingCount: numberNumber of dirty formulas still waiting for evaluation.
propertysize readonly size: numberTotal number of formula cells currently in the graph.
methodclear clear(): voidClears all graph data.
methodenforceCommandBoundary enforceCommandBoundary(isCommandExecuting: (): boolean): voidBinds mutations to the owning editor command dispatch after initialization.
isCommandExecuting: (): boolean
methodgetDependencies getDependencies(formulaKey: number): readonly Dependency[]Gets the range-level dependencies owned by one formula cell.
Returned dependencies are defensive copies and must not expose mutable graph internals. Non-formula cells return an empty array.
ReturnsRange-level Dependency list used by the formula.
formulaKey: numberCellKey for the formula cell.
methodgetDependents getDependents(key: number): number[]Gets every formula that depends on one cell.
Uses three reverse-lookup indexes:
- Per-cell reverse dependencies (cellRevDeps) — O(1)
- Column-grouped interval lookup (columnRanges) — O(log N + K)
- Overflow-list linear scan (overflowRanges) — O(M)
ReturnsCellKeys for all formulas that depend on that cell.
key: numberCellKey for the referenced cell.
methodgetFormulaKeys getFormulaKeys(): readonly number[]Gets formula cells currently registered in the graph.
The returned array is a stable snapshot for diagnostics and host status views. Mutating it must not affect graph internals.
ReturnsCellKeys for every formula cell with registered dependencies.
methodgetLastCycleKeys getLastCycleKeys(): number[]Cycle nodes detected by the last markDirty call.
Formulas in a cycle should display the #REF! error. markDirty detects cycles by topological elimination: repeatedly remove ready nodes; the remaining nodes are part of cycles.
methodgetNextReadyBatch getNextReadyBatch(viewport: Set<number>, maxCount: number): number[]Gets currently dirty formulas that can be evaluated immediately.
"Ready" means all dependencies for the formula are clean and there are no dirty dependencies. Viewport formulas are returned first so visible results update before off-screen ones.
ReturnsCellKeys for formulas that can be evaluated immediately.
viewport: Set<number>CellKeys currently inside the viewport.
maxCount: numberMaximum number of formulas to return.
methodisDirty isDirty(key: number): booleanReports whether one formula cell is currently dirty.
Non-formula cells and clean formula cells return false.
ReturnsTrue when the formula is waiting for recalculation.
key: numberCellKey for the formula to inspect.
methodmarkClean markClean(key: number): voidMarks one formula clean after evaluation completes.
Unlocks downstream dependencies by decrementing dirtyDepCount for each dirty formula that depends on key. When dirtyDepCount reaches 0, that formula becomes ready and can be returned by getNextReadyBatch.
key: numberCellKey for the formula that has finished evaluating.
methodmarkDirty markDirty(changedKeys: number[]): voidMarks all affected formulas dirty.
Starts from changedKeys and propagates dirty marks along reverse-dependency edges using BFS. Complexity is O(affected formulas + edges), with no topological sort.
Cycle detection records nodes inside the cycle in lastCycleKeys, which can be read through getLastCycleKeys().
changedKeys: number[]CellKeys for cells whose values changed.
methodonStructureChanged onStructureChanged(changes: StructureChange[]): voidNotifies the graph about structural changes.
Called for row/column insertions and deletions, and updates range coordinates in spatial indexes. Large change sets may choose lazy rebuilds by clearing indexes and rebuilding on the next query.
changes: StructureChange[]Structural change list.
methodremoveCell removeCell(formulaKey: number): voidRemoves one formula cell.
Clears the formula's:
- forward dependencies (deps Map)
- reverse indexes (cellRevDeps + columnRanges + overflowRanges)
- dirty state (dirtySet + dirtyDepCount)
formulaKey: number
methodupdateCell updateCell(formulaKey: number, deps: Dependency[]): voidRegisters or updates dependencies for one formula cell.
deps is a range-level Dependency list and is not expanded per cell. Existing formula-cell dependencies are removed before the new set is registered.
formulaKey: numberCellKey for the formula cell.
deps: Dependency[]Range-level Dependency list used by the formula.
- interfaceIFormulaCalculationTraceProvidersource ↗
-
interface IFormulaCalculationTraceProviderRead-only subscription provider for formula calculation trace events.
Hosts should subscribe through the command surface, while plugins can inject this provider directly during the editor lifecycle. Events are local runtime trace and do not participate in OT or persistence.
methodsubscribeFormulaCalculationTrace subscribeFormulaCalculationTrace(listener: FormulaCalculationTraceListener): (): voidSubscribes to formula calculation trace events for one editor instance.
ReturnsFunction that removes the listener; calling it more than once is safe.
listener: FormulaCalculationTraceListenerCallback invoked for future calculation trace events.
- interfaceIFormulaDateSystemProvidersource ↗
-
interface IFormulaDateSystemProviderEditor-local source for the workbook date serial system.
methodgetDateSystem getDateSystem(): FormulaDateSystem - interfaceIFormulaEvaluatorsource ↗
-
interface IFormulaEvaluatorPublic contract for IFormulaEvaluator.
methodevaluate evaluate(ast: FormulaAST, context: EvalContext): FormulaValueEvaluates one AST.
Recursively traverses the AST, performs operations, and handles error propagation:
- Any FormulaError operand -> result is that error.
- Division by zero -> #DIV/0!.
- Type mismatch -> #VALUE!.
- Unknown function name -> #NAME?.
ReturnsCalculated result.
ast: FormulaASTParsed formula AST.
context: EvalContextEvaluation context that provides cell-value reads.
methodevaluateBatch evaluateBatch(asts: { ast: FormulaAST; key: number }[], context: EvalContext): EvalResult[]Batch evaluation.
The TS implementation can call evaluate one by one. A WASM implementation can process all ASTs on the Rust side in one pass, avoiding 100K JS <-> WASM boundary crossings.
ReturnsEvaluation result list.
asts: { ast: FormulaAST; key: number }[]AST list to evaluate; each item contains a CellKey and its AST.
context: EvalContextEvaluation context.
methodregisterFunction registerFunction(fn: FormulaFunction): voidRegisters a custom function.
After registration, formulas can call the function by name. For example, registering AVERAGE allows =AVERAGE(A1:A10).
fn: FormulaFunction
- interfaceIFormulaExternalServiceProvidersource ↗
-
interface IFormulaExternalServiceProvider extends FormulaExternalServiceReaderEditor-owned registry used by hosts to publish services and cache invalidation.
methoddestroy destroy(ownerToken?: object): voidownerToken: object
methodenforceCommandBoundary enforceCommandBoundary(isCommandExecuting: (): boolean, dispatchRemoval: (id: number): void): voidisCommandExecuting: (): booleandispatchRemoval: (id: number): void
methodenforceTeardownBoundary enforceTeardownBoundary(ownerToken: object): voidownerToken: object
methodinvalidate invalidate<T>(definition: FormulaExternalServiceDefinition<T>): voiddefinition: FormulaExternalServiceDefinition<T>
methodregister register<T>(definition: FormulaExternalServiceDefinition<T>, service: T): (): voiddefinition: FormulaExternalServiceDefinition<T>service: T
methodsubscribeInvalidation subscribeInvalidation(listener: (serviceIds: readonly string[]): void): (): voidlistener: (serviceIds: readonly string[]): void
methodunregisterRegistration unregisterRegistration(id: number): voidid: number
- interfaceIFormulaIterationSettingsProvidersource ↗
-
interface IFormulaIterationSettingsProviderOptional editor-local provider for circular formula calculation.
methodgetSettings getSettings(): FormulaIterationSettings - interfaceIFormulaLocaleProvidersource ↗
-
interface IFormulaLocaleProviderEditor-local locale provider consumed by formula evaluation hosts.
methodgetDateTimeLocale getDateTimeLocale(): FormulaDateTimeLocaleReturns the current date/time locale strategy for formula functions.
methodgetTextLocale getTextLocale(): FormulaTextLocaleReturns the current text byte/width locale strategy for formula functions.
- interfaceIFormulaParsersource ↗
-
interface IFormulaParserPublic contract for IFormulaParser.
methodextractDependencies extractDependencies(ast: FormulaAST): Dependency[]Extracts all dependencies from an AST.
Traverses all cell and range nodes in the AST and returns a Dependency list. Returned dependencies stay range-level and are not expanded per cell.
Example// =SUM(A1:C100) + D5 extractDependencies(ast) → [ { kind: FormulaNodeKind.Range, start: [0,0], end: [99,2] }, { kind: FormulaNodeKind.Cell, row: 4, col: 3 } ]ast: FormulaAST
methodparse parse(formula: string): FormulaASTParses a formula string into an AST.
Input is a formula string with a leading '=', such as "=A1+B1". Uses recursive-descent parsing and supports the full operator precedence.
ReturnsParsed AST.
ThrowsWhen parsing fails because syntax is invalid.
formula: stringFormula string including the leading '='.
methodshiftReferences shiftReferences(ast: FormulaAST, changes: StructureChange[]): FormulaASTShifts references.
Rewrites row/column references inside an AST after structural changes such as row/column insertions and deletions. Uses immutable updates: creates a new AST and never mutates the original AST.
Rules:
- Absolute references ($A$1) are unaffected.
- Relative references shift according to insertion/deletion position.
- Deleted referenced rows/columns produce an AST carrying #REF!.
ExampleA formula =B3 in A2, after inserting one row below row 1, becomes =B4. A formula =SUM(A1:A3) in A4, after deleting row 2, becomes =SUM(A1:#REF!).ast: FormulaASTchanges: StructureChange[]
- interfaceIFormulaResultProvidersource ↗
-
interface IFormulaResultProviderRead-only provider for calculated formula results.
Rendering and other consumers use this interface to read per-client derived formula values without depending on a concrete formula plugin implementation.
methodforEachFormulaResultInRange forEachFormulaResultInRange(startRow: number, startColumn: number, endRow: number, endColumn: number, visit: (row: number, column: number): void): voidVisits calculated result coordinates in an inclusive range. Providers that project results into cells without persisted data must implement this so range consumers can discover those cells without probing empty positions.
startRow: numberstartColumn: numberendRow: numberendColumn: numbervisit: (row: number, column: number): void
methodgetFormulaResult getFormulaResult(row: number, col: number): FormulaValue | undefinedGets the calculated result for a formula anchor or one of its dynamic-array spill cells.
ReturnsFormulaValue, or undefined when not calculated or not a formula cell.
row: numberRow index (0-based).
col: numberColumn index (0-based).
- interfaceIFormulaRichResultProvidersource ↗
-
interface IFormulaRichResultProviderRead-only provider for non-text visual results produced by formula cells.
methodgetFormulaRichResult getFormulaRichResult(row: number, col: number): FormulaRichResult | undefinedrow: numbercol: number
- interfaceIFormulaSourceProvidersource ↗
-
interface IFormulaSourceProviderRead-only provider for the formula source text shown while editing.
methodgetFormulaSource getFormulaSource(row: number, col: number): string | undefinedGets the formula source that should be presented to the user for one cell.
Providers may return undefined when they do not own the queried cell. The default sheet formula provider returns the persisted formula text, while workbook-aware providers can return display text formatted from stable workbook bindings and the current sheet names.
row: numbercol: number
- interfaceIFormulaStatusProvidersource ↗
-
interface IFormulaStatusProviderRead-only provider for formula result, source, dependency, and dirty status.
Hosts should prefer the command surface that delegates to this provider, while plugins can inject the provider directly when they run inside the editor lifecycle.
methodgetFormulaCellStatus getFormulaCellStatus(row: number, col: number): FormulaCellStatusGets a stable formula status snapshot for one sheet cell.
ReturnsFormula status with defensive copies of dependency arrays.
row: numberRow index (0-based).
col: numberColumn index (0-based).
- interfaceIFormulaTextServiceProvidersource ↗
-
interface IFormulaTextServiceProviderOptional editor-local providers for metadata- and service-backed text formulas.
methodenforceCommandBoundary enforceCommandBoundary(isCommandExecuting: (): boolean, dispatchRemoval: (id: number): void): voidisCommandExecuting: (): booleandispatchRemoval: (id: number): void
methodgetLanguageService getLanguageService(): FormulaLanguageService | undefinedmethodgetPhoneticReader getPhoneticReader(): FormulaPhoneticReader | undefinedmethodregisterLanguageService registerLanguageService(service: FormulaLanguageService): (): voidservice: FormulaLanguageService
methodregisterPhoneticReader registerPhoneticReader(reader: FormulaPhoneticReader): (): voidreader: FormulaPhoneticReader
methodsubscribeInvalidation subscribeInvalidation(listener: (): void): (): voidlistener: (): void
methodunregisterRegistration unregisterRegistration(id: number): voidid: number
- interfaceIFunctionRegistrysource ↗
-
interface IFunctionRegistryPublic contract for IFunctionRegistry.
methodenforceCommandBoundary enforceCommandBoundary(isCommandExecuting: (): boolean, dispatchRemoval: (id: number): void): voidRequires post-initialization writes to occur during the owning editor's command dispatch.
isCommandExecuting: (): booleandispatchRemoval: (id: number): void
methodget get(name: string): FormulaFunction | undefinedGets a function definition by name.
ReturnsFunction definition, or undefined when it is not registered.
name: stringFunction name, case-insensitive.
methodhas has(name: string): booleanChecks whether a function has been registered.
name: stringFunction name, case-insensitive.
methodlist list(): string[]Lists all registered function names.
ReturnsFunction names in uppercase.
methodregister register(fn: FormulaFunction): (): voidRegisters a formula function.
fn: FormulaFunctionFunction definition; name is stored in uppercase automatically.
methodregisterMany registerMany(functions: readonly FormulaFunction[]): (): voidRegisters a group of formula functions and publishes one combined change notification.
functions: readonly FormulaFunction[]Function definitions in registration precedence order.
methodsubscribe subscribe(listener: (functionNames: readonly string[]): void): (): voidSubscribes to registrations and removals that can change formula results.
listener: (functionNames: readonly string[]): void
methodunregisterRegistration unregisterRegistration(id: number): voidRemoves one tokenized registration; disposal may dispatch an owner command.
id: number
- interfaceResolvedFormulaRangesource ↗
-
interface ResolvedFormulaRangeConcrete finite range resolved against sheet bounds.
- interfaceShiftedStructureCoordinatesource ↗
-
interface ShiftedStructureCoordinateResult of shifting one coordinate through structure changes.
- interfaceStructureMoveChangesource ↗
-
interface StructureMoveChangeFormula-aware row or column move.
- typeBinaryOpsource ↗
-
type BinaryOp = "+" | "-" | "*" | "/" | "^" | "&" | "=" | "<>" | "<" | ">" | "<=" | ">="Supported binary formula operators.
- typeDependencysource ↗
-
type Dependency = { col: number; kind: typeof FormulaNodeKind.Cell; row: number } | { end: [number, number]; kind: typeof FormulaNodeKind.Range; start: [number, number] } | { col: number; kind: typeof FormulaNodeKind.WorkbookCell; row: number; sheetName: string } | { end: [number, number]; kind: typeof FormulaNodeKind.WorkbookRange; sheetName: string; start: [number, number] } | { endCol: number; kind: typeof FormulaNodeKind.ColumnRange; startCol: number } | { endRow: number; kind: typeof FormulaNodeKind.RowRange; startRow: number }Formula dependency preserving cell and range reference semantics.
- typeFormulaAddInCallsource ↗
-
type FormulaAddInCall = FormulaRegisteredAddInCall | FormulaDirectAddInCallSupported host add-in invocation request.
- typeFormulaAddInRegistrationIdsource ↗
-
type FormulaAddInRegistrationId = numberStable numeric handle for one host-authorized add-in procedure.
- typeFormulaArgsource ↗
-
type FormulaArg = { kind: "value"; sourceAst?: FormulaAST; sourceKind?: FormulaNodeKind; value: FormulaValue } | { ast: FormulaAST; kind: "expression" } | { kind: "missing" } | { col: number; kind: typeof FormulaNodeKind.Cell; row: number } | { end: [number, number]; kind: typeof FormulaNodeKind.Range; start: [number, number] } | { col: number; kind: typeof FormulaNodeKind.WorkbookCell; row: number; sheetName: string } | { end: [number, number]; kind: typeof FormulaNodeKind.WorkbookRange; sheetName: string; start: [number, number] } | { endCol: number; kind: typeof FormulaNodeKind.ColumnRange; startCol: number } | { endRow: number; kind: typeof FormulaNodeKind.RowRange; startRow: number } | FormulaReferenceArgumentFunction argument preserving lazy reference and expression semantics.
- typeFormulaArraysource ↗
-
type FormulaArray = FormulaValue[][]Rectangular two-dimensional formula result represented as nested rows.
- typeFormulaASTsource ↗
-
type FormulaAST = { kind: typeof FormulaNodeKind.Number; value: number } | { kind: typeof FormulaNodeKind.String; value: string } | { kind: typeof FormulaNodeKind.Boolean; value: boolean } | { code: FormulaErrorCode; kind: typeof FormulaNodeKind.Error } | { kind: typeof FormulaNodeKind.Name; name: string } | { items: FormulaAST[]; kind: typeof FormulaNodeKind.Tuple } | { kind: typeof FormulaNodeKind.Intersection; left: FormulaAST; right: FormulaAST } | { kind: typeof FormulaNodeKind.Array; rows: FormulaAST[][] } | { kind: typeof FormulaNodeKind.Missing } | { absCol: boolean; absRow: boolean; col: number; kind: typeof FormulaNodeKind.Cell; row: number } | { absEndCol: boolean; absEndRow: boolean; absStartCol: boolean; absStartRow: boolean; end: [number, number]; kind: typeof FormulaNodeKind.Range; start: [number, number] } | { absCol: boolean; absRow: boolean; col: number; kind: typeof FormulaNodeKind.WorkbookCell; row: number; sheetName: string } | { absEndCol: boolean; absEndRow: boolean; absStartCol: boolean; absStartRow: boolean; end: [number, number]; kind: typeof FormulaNodeKind.WorkbookRange; sheetName: string; start: [number, number] } | { absEndCol: boolean; absStartCol: boolean; endCol: number; kind: typeof FormulaNodeKind.ColumnRange; startCol: number } | { absEndRow: boolean; absStartRow: boolean; endRow: number; kind: typeof FormulaNodeKind.RowRange; startRow: number } | { args: FormulaAST[]; kind: typeof FormulaNodeKind.Call; name: string } | { args: FormulaAST[]; callee: FormulaAST; kind: typeof FormulaNodeKind.Invoke } | { kind: typeof FormulaNodeKind.Binary; left: FormulaAST; op: BinaryOp; right: FormulaAST } | { kind: typeof FormulaNodeKind.Unary; op: UnaryOp; operand: FormulaAST }Serializable formula abstract syntax tree.
- typeFormulaCalculationTraceEventsource ↗
-
type FormulaCalculationTraceEvent = FormulaBatchFlushedEvent | FormulaRecalculationCompletedEvent | FormulaErrorChangedEvent | FormulaDependenciesChangedEventFormula calculation trace event union.
- typeFormulaCalculationTraceEventPayloadsource ↗
-
type FormulaCalculationTraceEventPayload = conditionalTrace event payload before the provider assigns its sequence number.
- typeFormulaCalculationTraceListenersource ↗
-
type FormulaCalculationTraceListener = (event: FormulaCalculationTraceEvent): voidListener invoked synchronously for calculation trace events.
- typeFormulaCellSourcesource ↗
-
type FormulaCellSource = "empty" | "value" | "formula"Origin of a persisted cell, kept distinct from its calculated value.
- typeFormulaCubeKpiPropertysource ↗
-
type FormulaCubeKpiProperty = typeof FormulaCubeKpiProperty[keyof typeof FormulaCubeKpiProperty]Type contract carried by the canonical FormulaCubeKpiProperty value.
- typeFormulaCubeMemberExpressionsource ↗
-
type FormulaCubeMemberExpression = string | FormulaCubeMemberValue | readonly FormulaCubeMemberExpression[]Serializable member or tuple expression accepted by CUBE services.
- typeFormulaCubeQuerysource ↗
-
type FormulaCubeQuery = { caption?: string; connection: string; kind: "kpi-member"; kpiName: string; property: FormulaCubeKpiProperty } | { caption?: string; connection: string; expression: FormulaCubeMemberExpression; kind: "member" } | { connection: string; kind: "member-property"; member: FormulaCubeMemberExpression; property: string } | { caption?: string; connection: string; kind: "ranked-member"; rank: number; set: string | FormulaCubeSetValue } | { caption?: string; connection: string; expression: string; kind: "set"; sortBy?: string; sortOrder?: number } | { kind: "set-count"; set: FormulaCubeSetValue } | { connection: string; kind: "value"; members: readonly FormulaCubeMemberExpression[] }Serializable query handled by a host-owned CUBE service.
- typeFormulaCubeResultsource ↗
-
type FormulaCubeResult = FormulaValue | FormulaCubeMemberValue | FormulaCubeSetValue | FormulaErrorValue returned from a host-owned CUBE service.
- typeFormulaDateSystemsource ↗
-
type FormulaDateSystem = typeof FormulaDateSystem[keyof typeof FormulaDateSystem]Workbook date serial systems supported by formula evaluation.
- typeFormulaDynamicDependencyRegistrarsource ↗
-
type FormulaDynamicDependencyRegistrar = (reference: ResolvedFormulaRange): voidCallback used to publish dynamic formula dependency edges.
- typeFormulaErrorCodesource ↗
-
type FormulaErrorCode = typeof FormulaErrorCode[keyof typeof FormulaErrorCode]Type contract carried by the canonical FormulaErrorCode value.
- typeFormulaFunctionArgumentKindsource ↗
-
type FormulaFunctionArgumentKind = "any" | "number" | "text" | "boolean" | "cell" | "range" | "array" | "reference" | "function" | "rich"Coarse argument kinds stable across formula-engine implementations.
- typeFormulaLanguageServiceResultsource ↗
-
type FormulaLanguageServiceResult = FormulaServiceCacheResult<string>Synchronous result exposed by a host-managed language-service cache.
- typeFormulaNodeKindsource ↗
-
type FormulaNodeKind = typeof FormulaNodeKind[keyof typeof FormulaNodeKind]Type contract carried by the canonical FormulaNodeKind value.
- typeFormulaRangeSourcesource ↗
-
type FormulaRangeSource = { kind: typeof FormulaRangeSourceKind.CurrentSheet } | { kind: typeof FormulaRangeSourceKind.WorkbookSheet; sheetName: string }Source owner for a resolved formula range.
- typeFormulaRangeSourceKindsource ↗
-
type FormulaRangeSourceKind = typeof FormulaRangeSourceKind[keyof typeof FormulaRangeSourceKind]Type contract carried by the canonical FormulaRangeSourceKind value.
- typeFormulaReferenceNodesource ↗
-
type FormulaReferenceNode = Extract<FormulaAST, { kind: typeof FormulaNodeKind.Cell | typeof FormulaNodeKind.Range | typeof FormulaNodeKind.WorkbookCell | typeof FormulaNodeKind.WorkbookRange | typeof FormulaNodeKind.RowRange | typeof FormulaNodeKind.ColumnRange }>Reference leaves shared by immutable formula transformations.
- typeFormulaReferenceStylesource ↗
-
type FormulaReferenceStyle = "A1" | "R1C1"Reference notation accepted by a reference resolver.
- typeFormulaRichResultsource ↗
-
type FormulaRichResult = FormulaHyperlinkResult | FormulaImageResultHost-neutral result projected by a formula cell renderer.
- typeFormulaServiceCacheResultsource ↗
-
type FormulaServiceCacheResult = { status: typeof FormulaServiceCacheStatus.Ready; value: T } | { status: typeof FormulaServiceCacheStatus.Pending | typeof FormulaServiceCacheStatus.Unavailable }Synchronous cache result; asynchronous work stays outside formula evaluation.
- typeFormulaValuesource ↗
-
type FormulaValue = null | number | string | boolean | FormulaText | FormulaError | FormulaReferenceValue | FormulaTupleValue | FormulaCubeMemberValue | FormulaCubeSetValue | FormulaValue[]Scalar, collection, error, or reference result produced by formulas.
- typeStructureChangesource ↗
-
type StructureChange = StructureInsertDeleteChange | StructureMoveChangePublic contract for one formula-aware structure change.
- typeStructureChangeAxissource ↗
-
type StructureChangeAxis = typeof StructureChangeAxis[keyof typeof StructureChangeAxis]Type contract carried by StructureChangeAxis.
- typeStructureChangeKindsource ↗
-
type StructureChangeKind = typeof StructureChangeKind[keyof typeof StructureChangeKind]Type contract carried by StructureChangeKind.
- typeStructureChangeTypesource ↗
-
type StructureChangeType = MatrixOTActionName.RowInsert | MatrixOTActionName.RowDelete | MatrixOTActionName.RowMove | MatrixOTActionName.ColInsert | MatrixOTActionName.ColDelete | MatrixOTActionName.ColMoveMatrix structure action understood by formula reference transforms.
- variableFormulaAddInServiceDefinitionsource ↗
-
FormulaAddInServiceDefinition: FormulaExternalServiceDefinition<FormulaAddInService>Typed identity used to publish a host-specific add-in implementation.
- variableFormulaBatchFlushedEventTypesource ↗
-
FormulaBatchFlushedEventType: "formula.batchFlushed"Stable event id for a formula batch flush.
- variableFormulaCalculationTraceEventTypesource ↗
-
FormulaCalculationTraceEventType: { BatchFlushed: "formula.batchFlushed"; DependenciesChanged: "formula.dependenciesChanged"; ErrorChanged: "formula.errorChanged"; RecalculationCompleted: "formula.recalculationCompleted" }Stable formula calculation trace event ids.
- variableFormulaCubeKpiPropertysource ↗
-
FormulaCubeKpiProperty: { KPICurrentTimeMember: 6; KPIGoal: 2; KPIStatus: 3; KPITrend: 4; KPIValue: 1; KPIWeight: 5 }Stable CUBE KPI property identifiers.
- variableFormulaCubeServiceDefinitionsource ↗
-
FormulaCubeServiceDefinition: FormulaExternalServiceDefinition<FormulaCubeService>Typed identity used to publish a host-specific CUBE implementation.
- variableFormulaDateSystemsource ↗
-
FormulaDateSystem: { Excel1900: 1900; Excel1904: 1904 }Workbook date serial systems supported by formula evaluation.
- variableFormulaDependenciesChangedEventTypesource ↗
-
FormulaDependenciesChangedEventType: "formula.dependenciesChanged"Stable event id for a formula dependency transition.
- variableFormulaErrorChangedEventTypesource ↗
-
FormulaErrorChangedEventType: "formula.errorChanged"Stable event id for a formula error transition.
- variableFormulaErrorCodesource ↗
-
FormulaErrorCode: { DivisionByZero: "#DIV/0!"; Name: "#NAME?"; NotAvailable: "#N/A"; NullIntersection: "#NULL!"; Number: "#NUM!"; Reference: "#REF!"; Spill: "#SPILL!"; Value: "#VALUE!" }Canonical Excel-compatible formula error code values.
- variableFormulaGoogleServiceDefinitionsource ↗
-
FormulaGoogleServiceDefinition: FormulaExternalServiceDefinition<FormulaGoogleService>Host-neutral service identity shared by Google-compatible cached formulas.
- variableFormulaHyperlinkServiceDefinitionsource ↗
-
FormulaHyperlinkServiceDefinition: FormulaExternalServiceDefinition<FormulaHyperlinkService>Typed identity for the host hyperlink service.
- variableFormulaImageServiceDefinitionsource ↗
-
FormulaImageServiceDefinition: FormulaExternalServiceDefinition<FormulaImageService>Typed identity for the host image service.
- variableFormulaLanguageServiceDefinitionsource ↗
-
FormulaLanguageServiceDefinition: FormulaExternalServiceDefinition<FormulaLanguageService>Canonical service identity used by cached language formulas and their hosts.
- variableFormulaNodeKindsource ↗
-
FormulaNodeKind: { Array: "array"; Binary: "binary"; Boolean: "boolean"; Call: "call"; Cell: "cell"; ColumnRange: "columnRange"; Error: "error"; Intersection: "intersection"; … }Stable discriminants used by formula AST nodes.
- variableFormulaPivotDataServiceDefinitionsource ↗
-
FormulaPivotDataServiceDefinition: FormulaExternalServiceDefinition<FormulaPivotDataService>Typed identity for the host pivot-data service.
- variableFormulaRangeSourceKindsource ↗
-
FormulaRangeSourceKind: { CurrentSheet: "currentSheet"; WorkbookSheet: "workbookSheet" }Stable source kinds for resolved formula ranges.
- variableFormulaRecalculationCompletedEventTypesource ↗
-
FormulaRecalculationCompletedEventType: "formula.recalculationCompleted"Stable event id for formula recalculation completion.
- variableFormulaRtdServiceDefinitionsource ↗
-
FormulaRtdServiceDefinition: FormulaExternalServiceDefinition<FormulaRtdService>Typed identity for the host RTD service.
- variableFormulaServiceCacheStatussource ↗
-
FormulaServiceCacheStatus: { Pending: "pending"; Ready: "ready"; Unavailable: "unavailable" }Canonical states of a host-managed formula service cache.
- variableFormulaStockHistoryServiceDefinitionsource ↗
-
FormulaStockHistoryServiceDefinition: FormulaExternalServiceDefinition<FormulaStockHistoryService>Stable external-service identity used by STOCKHISTORY and host caches.
- variableFormulaStructureChangeActionNamessource ↗
-
FormulaStructureChangeActionNames: readonly StructureChangeType[]Matrix OT action names that participate in formula reference rebasing.
- variableFormulaWebLimitssource ↗
-
FormulaWebLimits: Readonly<{ textLength: 32767; urlLength: 2048 }>Excel limits applied independently of the host's transport/security policy.
- variableFormulaWebServiceDefinitionsource ↗
-
FormulaWebServiceDefinition: FormulaExternalServiceDefinition<FormulaWebService>Shared identity for WEBSERVICE cache registration and recalculation.
- variableStructureChangeAxissource ↗
-
StructureChangeAxis: { Col: "col"; Row: "row" }Axis affected by one formula structure change.
- variableStructureChangeKindsource ↗
-
StructureChangeKind: { Delete: "delete"; Insert: "insert"; Move: "move" }Semantic kind of one formula structure change.
- functionassertSupportedStructureChangesource ↗
-
assertSupportedStructureChange(change: StructureChange): voidValidates indices on a formula structure change before rebasing.
change: StructureChange
- functioncreateFormulaErrorsource ↗
-
createFormulaError<T>(code: T): FormulaError & { code: T }Creates a validated serializable formula error value.
code: T
- functiondefineFormulaExternalServicesource ↗
-
defineFormulaExternalService<T>(id: string, options?: Pick<FormulaExternalServiceDefinition<T>, "subscribeInvalidation">): FormulaExternalServiceDefinition<T>Creates a stable external-service definition shared by hosts and plugins.
id: stringoptions: Pick<FormulaExternalServiceDefinition<T>, "subscribeInvalidation">
- functiongetStructureChangeAxissource ↗
-
getStructureChangeAxis(change: StructureChange): StructureChangeAxis | undefinedReturns the axis affected by one structure change.
change: StructureChange
- functiongetStructureChangeKindsource ↗
-
getStructureChangeKind(change: StructureChange): StructureChangeKind | undefinedReturns whether one structure change inserts, deletes, or moves coordinates.
change: StructureChange
- functionisFormulaArgumentKindsource ↗
-
isFormulaArgumentKind<K>(arg: FormulaArgumentLike | null | undefined, ...kinds: readonly K[]): argNarrows a formula argument to one or more discriminant kinds.
arg: FormulaArgumentLike | null | undefinedkinds: readonly K[]
- functionisFormulaErrorsource ↗
-
isFormulaError(value: unknown): valueReturns whether a formula value is an error value.
value: unknown
- functionisFormulaErrorCodesource ↗
-
isFormulaErrorCode(code: unknown): codeReports whether a runtime value is a canonical formula error code.
code: unknown
- functionmapFormulaReferenceNodessource ↗
-
mapFormulaReferenceNodes(ast: FormulaAST, map: (node: FormulaReferenceNode): FormulaAST): FormulaASTTraverses expression containers while preserving unchanged node identities.
ast: FormulaASTmap: (node: FormulaReferenceNode): FormulaAST
- functionmatrixOperationsToStructureChangessource ↗
-
matrixOperationsToStructureChanges(operations: readonly OTOperation[]): StructureChange[]Converts Matrix OT operations into formula structure changes.
operations: readonly OTOperation[]
- functionmatrixOperationToStructureChangesource ↗
-
matrixOperationToStructureChange(operation: OTOperation): StructureChange | nullConverts one Matrix OT structure operation into a formula structure change.
operation: OTOperation
- functionmoveFormulaReferencessource ↗
-
moveFormulaReferences(ast: FormulaAST, move: FormulaRangeMove): FormulaASTMoves referenced identities, including absolute references, without rebasing unrelated references.
ast: FormulaASTmove: FormulaRangeMove
- functionreorderFormulaReferencessource ↗
-
reorderFormulaReferences(ast: FormulaAST, changes: readonly StructureMoveChange[], options?: FormulaStructureMoveOptions): FormulaASTReorders reference identities (including absolute references) through the entire permutation.
ast: FormulaASTchanges: readonly StructureMoveChange[]options: FormulaStructureMoveOptions
- functionshiftStructureCoordinatesource ↗
-
shiftStructureCoordinate(input: { absolute?: boolean; axis: StructureChangeAxis; changes: readonly StructureChange[]; coordinate: number }): ShiftedStructureCoordinateShifts one coordinate through formula structure changes.
input: { absolute?: boolean; axis: StructureChangeAxis; changes: readonly StructureChange[]; coordinate: number }
- variableFormulaCubeKpiPropertyValuesource ↗
-
FormulaCubeKpiPropertyValue: { KPICurrentTimeMember: 6; KPIGoal: 2; KPIStatus: 3; KPITrend: 4; KPIValue: 1; KPIWeight: 5 }Stable CUBE KPI property identifiers.
No public exports match that search.