@starzhuimeng/formula-editor
Version:
A configurable formula editor with customizable symbols
19 lines (18 loc) • 484 B
TypeScript
import { FormulaElement } from '../types';
/**
* 公式解析器类
*/
export declare class FormulaParser {
/**
* 将字符串解析为公式元素树
* @param formula 公式字符串
* @returns 公式元素树
*/
static parse(formula: string): FormulaElement[];
/**
* 将公式元素树转换为字符串
* @param elements 公式元素树
* @returns 公式字符串
*/
static stringify(elements: FormulaElement[]): string;
}