@gridsheet/preact-core 3.0.0-rc.0 → 3.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/components/ContextMenu.d.ts +1 -0
  2. package/dist/components/EditorOptions.d.ts +11 -0
  3. package/dist/components/FunctionGuide.d.ts +19 -0
  4. package/dist/components/useAutocomplete.d.ts +25 -0
  5. package/dist/constants.d.ts +0 -13
  6. package/dist/formula/evaluator.d.ts +2 -0
  7. package/dist/formula/functions/__async.d.ts +9 -6
  8. package/dist/formula/functions/__base.d.ts +27 -5
  9. package/dist/formula/functions/abs.d.ts +2 -5
  10. package/dist/formula/functions/acos.d.ts +2 -5
  11. package/dist/formula/functions/add.d.ts +2 -5
  12. package/dist/formula/functions/and.d.ts +2 -12
  13. package/dist/formula/functions/asin.d.ts +2 -5
  14. package/dist/formula/functions/atan.d.ts +2 -5
  15. package/dist/formula/functions/atan2.d.ts +2 -5
  16. package/dist/formula/functions/average.d.ts +2 -12
  17. package/dist/formula/functions/col.d.ts +2 -6
  18. package/dist/formula/functions/concat.d.ts +2 -5
  19. package/dist/formula/functions/concatenate.d.ts +2 -12
  20. package/dist/formula/functions/cos.d.ts +2 -5
  21. package/dist/formula/functions/count.d.ts +2 -12
  22. package/dist/formula/functions/counta.d.ts +2 -12
  23. package/dist/formula/functions/countif.d.ts +2 -5
  24. package/dist/formula/functions/divide.d.ts +2 -5
  25. package/dist/formula/functions/eq.d.ts +2 -5
  26. package/dist/formula/functions/exp.d.ts +2 -5
  27. package/dist/formula/functions/gt.d.ts +2 -5
  28. package/dist/formula/functions/gte.d.ts +2 -5
  29. package/dist/formula/functions/hlookup.d.ts +2 -10
  30. package/dist/formula/functions/if.d.ts +2 -10
  31. package/dist/formula/functions/iferror.d.ts +2 -10
  32. package/dist/formula/functions/index.d.ts +2 -10
  33. package/dist/formula/functions/len.d.ts +2 -5
  34. package/dist/formula/functions/lenb.d.ts +2 -5
  35. package/dist/formula/functions/ln.d.ts +2 -5
  36. package/dist/formula/functions/log.d.ts +2 -5
  37. package/dist/formula/functions/log10.d.ts +2 -5
  38. package/dist/formula/functions/lt.d.ts +2 -5
  39. package/dist/formula/functions/lte.d.ts +2 -5
  40. package/dist/formula/functions/match.d.ts +2 -10
  41. package/dist/formula/functions/max.d.ts +2 -12
  42. package/dist/formula/functions/min.d.ts +2 -12
  43. package/dist/formula/functions/minus.d.ts +2 -5
  44. package/dist/formula/functions/mod.d.ts +2 -5
  45. package/dist/formula/functions/multiply.d.ts +2 -5
  46. package/dist/formula/functions/ne.d.ts +2 -5
  47. package/dist/formula/functions/not.d.ts +2 -5
  48. package/dist/formula/functions/now.d.ts +2 -2
  49. package/dist/formula/functions/or.d.ts +2 -12
  50. package/dist/formula/functions/pi.d.ts +2 -2
  51. package/dist/formula/functions/power.d.ts +2 -5
  52. package/dist/formula/functions/product.d.ts +2 -12
  53. package/dist/formula/functions/radians.d.ts +2 -5
  54. package/dist/formula/functions/rand.d.ts +2 -2
  55. package/dist/formula/functions/round.d.ts +2 -10
  56. package/dist/formula/functions/rounddown.d.ts +2 -10
  57. package/dist/formula/functions/roundup.d.ts +2 -10
  58. package/dist/formula/functions/row.d.ts +2 -6
  59. package/dist/formula/functions/sin.d.ts +2 -5
  60. package/dist/formula/functions/sqrt.d.ts +2 -5
  61. package/dist/formula/functions/sum.d.ts +2 -12
  62. package/dist/formula/functions/sumif.d.ts +2 -10
  63. package/dist/formula/functions/tan.d.ts +2 -5
  64. package/dist/formula/functions/uminus.d.ts +2 -5
  65. package/dist/formula/functions/vlookup.d.ts +2 -10
  66. package/dist/formula/mapping.d.ts +8 -1
  67. package/dist/index.d.ts +5 -4
  68. package/dist/index.js +7572 -6553
  69. package/dist/index.js.map +1 -1
  70. package/dist/lib/cell.d.ts +13 -1
  71. package/dist/lib/coords.d.ts +1 -1
  72. package/dist/lib/hub.d.ts +8 -4
  73. package/dist/lib/spatial.d.ts +2 -0
  74. package/dist/lib/table.d.ts +6 -1
  75. package/dist/policy/core.d.ts +16 -9
  76. package/dist/sentinels.d.ts +23 -0
  77. package/dist/store/actions.d.ts +12 -0
  78. package/dist/store/dispatchers.d.ts +2 -0
  79. package/dist/store/helpers.d.ts +0 -6
  80. package/dist/styles/minified.d.ts +2 -2
  81. package/dist/types.d.ts +19 -9
  82. package/package.json +1 -1
@@ -3,6 +3,7 @@ import { ContextMenuProps } from '../types';
3
3
  export declare const ContextMenu: () => JSX.Element | null;
4
4
  export declare const DividerItem: (props: ContextMenuProps) => JSX.Element;
5
5
  export declare const CutItem: (props: ContextMenuProps) => JSX.Element;
6
+ export declare const SearchItem: (props: ContextMenuProps) => JSX.Element;
6
7
  export declare const CopyItem: (props: ContextMenuProps) => JSX.Element;
7
8
  export declare const PasteItem: (props: ContextMenuProps) => JSX.Element;
8
9
  export declare const PasteOnlyValueItem: (props: ContextMenuProps) => JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ interface EditorOptionsProps {
3
+ filteredOptions: any[];
4
+ top: number;
5
+ left: number;
6
+ selected: number;
7
+ onOptionMouseDown: (e: React.MouseEvent<HTMLLIElement>, i: number) => void;
8
+ }
9
+ export declare const EditorOptions: React.FC<EditorOptionsProps>;
10
+ export {};
11
+ //# sourceMappingURL=EditorOptions.d.ts.map
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { FunctionHelp } from '../formula/mapping';
3
+ import { AutocompleteOption } from '../policy/core';
4
+ type OptionWithGuide = AutocompleteOption & {
5
+ isFunction?: boolean;
6
+ example?: string;
7
+ helpTexts?: string[];
8
+ helpArgs?: any[];
9
+ };
10
+ export interface FunctionGuideProps {
11
+ option?: OptionWithGuide;
12
+ activeFunctionGuide?: FunctionHelp;
13
+ activeArgIndex?: number;
14
+ top?: number;
15
+ left?: number;
16
+ }
17
+ export declare const FunctionGuide: React.FC<FunctionGuideProps>;
18
+ export {};
19
+ //# sourceMappingURL=FunctionGuide.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { FunctionHelp } from '../formula/mapping';
2
+ import { FunctionMapping } from '../formula/functions/__base';
3
+ import { AutocompleteOption } from '../policy/core';
4
+ type UseAutocompleteProps = {
5
+ inputting: string;
6
+ selectionStart: number;
7
+ optionsAll: AutocompleteOption[];
8
+ functions?: FunctionMapping;
9
+ };
10
+ export declare const useAutocomplete: ({ inputting, selectionStart, optionsAll, functions }: UseAutocompleteProps) => {
11
+ filteredOptions: any[];
12
+ selected: number;
13
+ setSelected: import('react').Dispatch<import('react').SetStateAction<number>>;
14
+ replaceWithOption: (option: any) => {
15
+ value: string;
16
+ selectionStart: any;
17
+ };
18
+ handleArrowUp: (e: React.KeyboardEvent<HTMLTextAreaElement>) => boolean;
19
+ handleArrowDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => boolean;
20
+ isFormula: boolean;
21
+ activeFunctionHelp: FunctionHelp | null;
22
+ activeArgIndex: number;
23
+ };
24
+ export {};
25
+ //# sourceMappingURL=useAutocomplete.d.ts.map
@@ -11,19 +11,6 @@ export declare const MIN_HEIGHT = 5;
11
11
  export declare const OVERSCAN_X = 5;
12
12
  export declare const OVERSCAN_Y = 10;
13
13
  export declare const DEFAULT_ALPHABET_CACHE_SIZE = 1000;
14
- export declare class Special {
15
- name: string;
16
- constructor(name: string);
17
- }
18
- /**
19
- * Sentinel value representing an in-flight async formula computation.
20
- * Cells whose solved cache contains a Pending will render a loading indicator.
21
- * Dependent cells that encounter a Pending value also become pending.
22
- */
23
- export declare class Pending {
24
- promise: Promise<any>;
25
- constructor(promise: Promise<any>);
26
- }
27
14
  export declare const SECONDS_IN_DAY = 86400;
28
15
  export declare const FULLDATE_FORMAT_UTC = "YYYY-MM-DDTHH:mm:ss.SSSZ";
29
16
  export declare const RESET_ZONE: ZoneType;
@@ -118,6 +118,8 @@ export declare class Parser {
118
118
  build(): Expression | undefined;
119
119
  private parse;
120
120
  }
121
+ /** Alias for Parser, exported for external tooling (e.g. Debugger). */
122
+ export declare const FormulaParser: typeof Parser;
121
123
  export declare const identifyFormula: (value: any, { idMap, ...props }: IdentifyProps) => any;
122
124
  export declare const stripSheetName: (sheetName: string) => string;
123
125
  export declare function splitRef(ref: string): {
@@ -1,4 +1,4 @@
1
- import { Pending, Special } from '../../constants';
1
+ import { Pending, Sentinel } from '../../sentinels';
2
2
  import { Wire } from '../../lib/hub';
3
3
  import { PointType } from '../../types';
4
4
  /**
@@ -6,7 +6,7 @@ import { PointType } from '../../types';
6
6
  * Since user functions can return undefined or null, we need a special marker
7
7
  * to indicate "no cache entry found" vs "cache entry is undefined".
8
8
  */
9
- export declare const asyncCacheMiss: Special;
9
+ export declare const asyncCacheMiss: Sentinel;
10
10
  /** Returns true if any element of `args` is a Pending sentinel. */
11
11
  export declare const hasPendingArg: (args: any[]) => boolean;
12
12
  /**
@@ -32,25 +32,28 @@ export declare const buildAsyncCacheKey: (funcName: string, bareArgs: any[], has
32
32
  export declare const getAsyncCache: (table: {
33
33
  wire: Wire;
34
34
  getId: (p: PointType) => string;
35
- }, origin: PointType, key: string) => any;
35
+ }, origin: PointType, key: string, useInflight?: boolean) => any;
36
36
  /**
37
37
  * Handle an async (Promise) result returned by BaseFunction.main().
38
38
  *
39
39
  * Cache is stored per-cell in cell.asyncCache.
40
40
  * In-flight tracking uses Wire.asyncPending (keyed by cell ID).
41
+ * If useInflight is true, also tracks by cache key in Wire.asyncInflight.
41
42
  *
42
43
  * Flow:
43
44
  * 1. If cell has asyncCache and the key matches (inputs unchanged) and not expired → return cached value
44
45
  * 2. If there is already an in-flight promise for this cell → return its Pending
45
- * 3. Otherwise start the async work, return a new Pending, and on completion
46
+ * 3. If useInflight is true and there is an in-flight promise for this key → return its Pending
47
+ * 4. Otherwise start the async work, return a new Pending, and on completion
46
48
  * write the result into cell.asyncCache and trigger a re-render.
47
49
  *
48
50
  * @param ttlMilliseconds - Cache time-to-live in **milliseconds**. undefined = never expires.
51
+ * @param useInflight - If true, reuse the same promise for matching cache keys across different cells.
49
52
  */
50
- export declare const getOrSaveAsyncCache: (promise: Promise<any>, table: {
53
+ export declare const awaitAndSave: (promise: Promise<any>, table: {
51
54
  wire: Wire;
52
55
  getId: (p: PointType) => string;
53
- }, origin: PointType, key: string, ttlMilliseconds?: number) => any;
56
+ }, origin: PointType, key: string, ttlMilliseconds?: number, useInflight?: boolean) => Pending;
54
57
  /**
55
58
  * Create a Pending sentinel that resolves immediately.
56
59
  * Used when an argument is already pending — the result is propagated.
@@ -6,25 +6,47 @@ export type FunctionProps = {
6
6
  table: Table;
7
7
  origin?: PointType;
8
8
  };
9
+ export type HelpArg = {
10
+ name: string;
11
+ description: string;
12
+ optional?: boolean;
13
+ iterable?: boolean;
14
+ type?: ('number' | 'string' | 'boolean' | 'date' | 'time' | 'range' | 'reference' | 'any')[];
15
+ };
16
+ export declare const conditionArg: HelpArg;
9
17
  export declare class BaseFunction {
10
18
  example: string;
11
19
  helpTexts: string[];
12
- helpArgs: {
13
- name: string;
14
- description: string;
15
- }[];
20
+ helpArgs: HelpArg[];
21
+ /** Indicates if this function is async. Override in subclass or use BaseFunctionAsync. */
22
+ protected isAsync: boolean;
16
23
  /** Cache TTL in milliseconds. Override in subclass to set expiry. undefined = never expires. */
17
24
  protected ttlMilliseconds?: number;
18
25
  /** Hash precision for cache key generation. Higher values reduce collision risk. Default: 1 */
19
26
  protected hashPrecision: number;
27
+ /** If true, reuse the same in-flight promise for matching cache keys across different cells. */
28
+ protected useInflight: boolean;
20
29
  protected bareArgs: any[];
21
30
  protected table: Table;
22
31
  protected origin?: PointType;
23
32
  constructor({ args, table, origin }: FunctionProps);
24
33
  protected validate(): void;
25
- private get isMainAsync();
26
34
  call(): any;
27
35
  }
36
+ /**
37
+ * Base class for sync functions.
38
+ * Extend this class to create sync functions that support caching.
39
+ */
40
+ export declare class BaseFunctionSync extends BaseFunction {
41
+ protected isAsync: boolean;
42
+ }
43
+ /**
44
+ * Base class for async functions.
45
+ * Extend this class to create async functions that support caching.
46
+ */
47
+ export declare class BaseFunctionAsync extends BaseFunction {
48
+ protected isAsync: boolean;
49
+ }
28
50
  export type FunctionMapping = {
29
51
  [functionName: string]: typeof BaseFunction;
30
52
  };
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class AbsFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(value: number): number;
11
8
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class AcosFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(value: number): number;
11
8
  }
@@ -1,12 +1,9 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  import { TimeDelta } from '../../lib/time';
3
3
  export declare class AddFunction extends BaseFunction {
4
4
  example: string;
5
5
  helpText: string[];
6
- helpArgs: {
7
- name: string;
8
- description: string;
9
- }[];
6
+ helpArgs: HelpArg[];
10
7
  protected validate(): void;
11
8
  protected main(v1: number | Date | TimeDelta, v2: number | Date | TimeDelta): number | Date;
12
9
  }
@@ -1,18 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class AndFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: ({
6
- name: string;
7
- description: string;
8
- optional?: undefined;
9
- iterable?: undefined;
10
- } | {
11
- name: string;
12
- description: string;
13
- optional: boolean;
14
- iterable: boolean;
15
- })[];
5
+ helpArgs: HelpArg[];
16
6
  protected validate(): void;
17
7
  protected main(...values: boolean[]): boolean;
18
8
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class AsinFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(value: number): number;
11
8
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class AtanFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(value: number): number;
11
8
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class Atan2Function extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(x: number, y: number): number;
11
8
  }
@@ -1,18 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class AverageFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: ({
6
- name: string;
7
- description: string;
8
- optional?: undefined;
9
- iterable?: undefined;
10
- } | {
11
- name: string;
12
- description: string;
13
- optional: boolean;
14
- iterable: boolean;
15
- })[];
5
+ helpArgs: HelpArg[];
16
6
  protected validate(): void;
17
7
  protected main(...values: number[]): number;
18
8
  }
@@ -1,12 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class ColFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- option: boolean;
9
- }[];
5
+ helpArgs: HelpArg[];
10
6
  protected validate(): void;
11
7
  protected main(left: number): number;
12
8
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class ConcatFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(v1: string, v2: string): string;
11
8
  }
@@ -1,18 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class ConcatenateFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: ({
6
- name: string;
7
- description: string;
8
- optional?: undefined;
9
- iterable?: undefined;
10
- } | {
11
- name: string;
12
- description: string;
13
- optional: boolean;
14
- iterable: boolean;
15
- })[];
5
+ helpArgs: HelpArg[];
16
6
  protected validate(): void;
17
7
  protected main(...values: string[]): string;
18
8
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class CosFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(angle: number): number;
11
8
  }
@@ -1,18 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class CountFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: ({
6
- name: string;
7
- description: string;
8
- optional?: undefined;
9
- iterable?: undefined;
10
- } | {
11
- name: string;
12
- description: string;
13
- optional: boolean;
14
- iterable: boolean;
15
- })[];
5
+ helpArgs: HelpArg[];
16
6
  protected validate(): void;
17
7
  protected main(...values: any[]): number;
18
8
  }
@@ -1,18 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class CountaFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: ({
6
- name: string;
7
- description: string;
8
- optional?: undefined;
9
- iterable?: undefined;
10
- } | {
11
- name: string;
12
- description: string;
13
- optional: boolean;
14
- iterable: boolean;
15
- })[];
5
+ helpArgs: HelpArg[];
16
6
  protected validate(): void;
17
7
  protected main(...values: any[]): number;
18
8
  }
@@ -1,12 +1,9 @@
1
1
  import { Table } from '../../lib/table';
2
- import { BaseFunction } from './__base';
2
+ import { BaseFunction, HelpArg } from './__base';
3
3
  export declare class CountifFunction extends BaseFunction {
4
4
  example: string;
5
5
  helpText: string[];
6
- helpArgs: {
7
- name: string;
8
- description: string;
9
- }[];
6
+ helpArgs: HelpArg[];
10
7
  protected validate(): void;
11
8
  protected main(table: Table, condition: string): number;
12
9
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class DivideFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(divided: number, divisor: number): number;
11
8
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class EqFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(v1: any, v2: any): boolean;
11
8
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class ExpFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(exponent: number): number;
11
8
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class GtFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(v1: number, v2: number): boolean;
11
8
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class GteFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(v1: number, v2: number): boolean;
11
8
  }
@@ -1,17 +1,9 @@
1
1
  import { Table } from '../../lib/table';
2
- import { BaseFunction } from './__base';
2
+ import { BaseFunction, HelpArg } from './__base';
3
3
  export declare class HlookupFunction extends BaseFunction {
4
4
  example: string;
5
5
  helpText: string[];
6
- helpArgs: ({
7
- name: string;
8
- description: string;
9
- option?: undefined;
10
- } | {
11
- name: string;
12
- description: string;
13
- option: boolean;
14
- })[];
6
+ helpArgs: HelpArg[];
15
7
  protected validate(): void;
16
8
  protected main(key: any, range: Table, index: number, isSorted: boolean): any;
17
9
  }
@@ -1,16 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class IfFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: ({
6
- name: string;
7
- description: string;
8
- optional?: undefined;
9
- } | {
10
- name: string;
11
- description: string;
12
- optional: boolean;
13
- })[];
5
+ helpArgs: HelpArg[];
14
6
  protected validate(): void;
15
7
  protected main(condition: boolean, v1: any, v2?: any): any;
16
8
  }
@@ -1,16 +1,8 @@
1
- import { FunctionProps } from './__base';
1
+ import { FunctionProps, HelpArg } from './__base';
2
2
  export declare class IfErrorFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: ({
6
- name: string;
7
- description: string;
8
- optional?: undefined;
9
- } | {
10
- name: string;
11
- description: string;
12
- optional: boolean;
13
- })[];
5
+ helpArgs: HelpArg[];
14
6
  private args;
15
7
  private table;
16
8
  constructor({ args, table }: FunctionProps);
@@ -1,17 +1,9 @@
1
1
  import { Table } from '../../lib/table';
2
- import { BaseFunction } from './__base';
2
+ import { BaseFunction, HelpArg } from './__base';
3
3
  export declare class IndexFunction extends BaseFunction {
4
4
  example: string;
5
5
  helpText: string[];
6
- helpArgs: ({
7
- name: string;
8
- description: string;
9
- optional?: undefined;
10
- } | {
11
- name: string;
12
- description: string;
13
- optional: boolean;
14
- })[];
6
+ helpArgs: HelpArg[];
15
7
  protected validate(): void;
16
8
  protected main(table: Table, y?: number, x?: number): Table;
17
9
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class LenFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(text: string): number;
11
8
  }
@@ -1,11 +1,8 @@
1
- import { BaseFunction } from './__base';
1
+ import { BaseFunction, HelpArg } from './__base';
2
2
  export declare class LenbFunction extends BaseFunction {
3
3
  example: string;
4
4
  helpText: string[];
5
- helpArgs: {
6
- name: string;
7
- description: string;
8
- }[];
5
+ helpArgs: HelpArg[];
9
6
  protected validate(): void;
10
7
  protected main(text: string): number;
11
8
  }