Rocky_Mountain_Vending/.pnpm-store/v10/files/89/d873b71696237906fc9d3023610f9d933862a1a9b5b3623a7b9fe75c745d7adb881b00832b9dcd5df830ade0ccf8582eedb7301908b90e13dd880bbef7fdb5-exec
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

52 lines
1.1 KiB
Text
Executable file

/**
* Formula parser
*/
export class Parser<T extends (string | number)> {
/**
* Create a new formula parser.
*
* @param formula - the formula string to parse.
* @param options - optional settings.
*/
constructor(formula: string, options?: Options);
/**
* Evaluate the formula.
*
* @param context - optional object with runtime formula context used to resolve variables.
*
* @returns the string or number outcome of the resolved formula.
*/
evaluate(context?: any): T;
}
export interface Options {
/**
* A hash of key - value pairs used to convert constants to values.
*/
readonly constants?: Record<string, any>;
/**
* A regular expression used to validate token variables.
*/
readonly tokenRx?: RegExp;
/**
* A variable resolver factory function.
*/
readonly reference?: Options.Reference;
/**
* A hash of key-value pairs used to resolve formula functions.
*/
readonly functions?: Record<string, Function>;
}
export namespace Options {
type Reference = (name: string) => (context: any) => any;
}