f7
f7 is a spreadsheet formula execution library
git clone https://git.vogt.world/f7.git
Log | Files | README.md | LICENSE.md
← All files
name: src/main/js/models/common/Types.ts
-rw-r--r--
1041
 1import { F7Exception } from "../../errors/F7Exception";
 2import { CellQuery } from "../nodes/CellQuery";
 3import { Grid } from "./Grid";
 4import { SheetColumnRowKey } from "./SheetColumnRowKey";
 5
 6/**
 7 * The primitive values.
 8 */
 9export type Primitive = null | string | number | boolean;
10
11/**
12 * Simple types that represent a value, or a lookup.
13 */
14export type Computed = null | string | number | boolean | CellQuery | F7Exception;
15
16/**
17 * The common type that F7 formulas use.
18 */
19export type Complex = null | string | number | boolean | CellQuery | F7Exception | Grid<Computed>;
20
21/**
22 * A lookup function is a typed function that takes a value of common type and returns the same
23 */
24export type LookupFunction = (value: Complex) => Complex;
25
26/**
27 * A collateral lookup function is a typed function that takes a value of common type and returns the same, using the
28 * origin to possibly lookup another value if value is of the type CellQuery.
29 */
30export type CollateralLookupFunction = (origin: SheetColumnRowKey, value: Complex) => Complex;