@sheetxl/primitives 0.7.28-beta.4 → 0.8.0-beta.2

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.
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The KIND of one value — the total discriminator over {@link IFunctionArguments.RawArg}, and the
3
+ * vocabulary a RETURN declaration speaks ({@link IFunction.IReturnType.getKind}).
4
+ *
5
+ * @remarks
6
+ * A value's kind and its extent are different axes: `{10}`, `A1` and a bare `10` all reach a
7
+ * range-typed parameter as a 1x1 container, yet Excel separates them:
8
+ * `VLOOKUP(10,10,1,TRUE)` is `#N/A` while `VLOOKUP(10,{10},1,TRUE)` is 10, and `TYPE` answers
9
+ * 1 vs 64. The kind is what the CALLER supplied; the extent is merely its size.
10
+ *
11
+ * The scalar kinds ARE {@link ScalarType} values — one vocabulary, so
12
+ * `getKindAt(i) === ScalarType.Boolean` reads naturally — extended with the four kinds only an
13
+ * argument can be: a reference, a non-reference array, a callable, and no argument at all. As an
14
+ * argument kind, {@link ScalarType.Null} means a BLANK value.
15
+ *
16
+ * The names and values are ours. The numeric codes Excel's `TYPE` function answers are a
17
+ * PROJECTION of this kind (see `TYPE`'s implementation), not the kind itself.
18
+ *
19
+ * @see {@link IFunctionArguments.getKindAt}
20
+ */
21
+ export declare const ValueKind: {
22
+ /** A reference — `A1`, `A1:B3`, or a reference-returning call (`INDEX`, `OFFSET`, `TAKE`). */
23
+ readonly Reference: "reference";
24
+ /** An ARRAY that is not a reference — `{1,2}`, or a computed one (`SEQUENCE`, `TRANSPOSE(…)`). */
25
+ readonly Array: "array";
26
+ /** A callable — `LAMBDA(…)`, an eta-reduced function name, or a lambda-valued binding. */
27
+ readonly Lambda: "lambda";
28
+ /**
29
+ * OMITTED — nothing at this position: the empty comma of `CUMIPMT(,120,…)`, or a position
30
+ * past what the caller wrote. A blank CELL is a `Reference` (blankness is the cell's value).
31
+ * ABSENT-vs-omitted — whether the position exists in the call at all — is not a kind; it is
32
+ * `index >= getLength()`.
33
+ */
34
+ readonly Omitted: "omitted";
35
+ readonly Number: "number";
36
+ readonly String: "string";
37
+ readonly Boolean: "boolean";
38
+ readonly Error: "error";
39
+ readonly RichData: "richData";
40
+ readonly Null: "null";
41
+ };
42
+ export type ValueKind = typeof ValueKind[keyof typeof ValueKind];
43
+ //# sourceMappingURL=ValueKind.d.ts.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Declares that a function's RESULT can change with nothing dirty, so a cell naming it
3
+ * recalculates on every pass.
4
+ *
5
+ * ```ts
6
+ * export function NOW(): Volatile<number> { ... }
7
+ * ```
8
+ *
9
+ * @see {@link IFunction.ReturnTypeJSON.volatile}
10
+ */
11
+ export type Volatile<T> = T;
12
+ //# sourceMappingURL=Volatile.d.ts.map
@@ -10,17 +10,21 @@ export declare const WildCard: {
10
10
  /**
11
11
  * Compiles Excel wildcard text into a regex.
12
12
  *
13
- * @param anchor Whether the pattern must match the WHOLE string. Excel matches a whole cell, so
14
- * every lookup and criteria caller anchors; `SEARCH`, which looks for a substring, does not.
13
+ * @param anchor Where the pattern has to line up: `true` for the WHOLE string, `'start'` for a
14
+ * PREFIX, `false` for anywhere in it. Excel matches a whole cell, so every lookup and criteria
15
+ * caller anchors; `SEARCH`, which looks for a substring, does not; and a `D` function's criteria
16
+ * table is the prefix form — `DSUM` with the criterion `appl` takes the row whose value is
17
+ * `Apple`, where `COUNTIF` with the same criterion takes none.
15
18
  *
16
19
  * @remarks
17
- * `~` escapes the next `*`, `?` or `~`; standing alone it is a literal tilde (`COUNTIF(range,
18
- * "a~b")` finds the text `a~b`). One left-to-right pass, because chained replaces cannot express
19
- * this: the previous implementation guarded its `*`/`?` rewrites with `([^~]??)`, a lazy OPTIONAL
20
- * group that matches empty and so guards nothing, and then unescaped `~([?*])` — which could
21
- * never fire, the `*` and `?` having already become `.*` and `.`. Every escape was silently
22
- * ignored, so `"~*"` compiled to `~.*`: a literal tilde followed by anything.
20
+ * `~` escapes the next `*`, `?` or `~`; before anything else it is dropped, not kept —
21
+ * `SEARCH("~b","abc")` is 2 and `MATCH("a~b",…)` finds the text `ab`. A caller that reaches this
22
+ * compiler only when the pattern holds a `*` or `?` — which is what COUNTIF and its family do —
23
+ * therefore still compares `"a~b"` literally, because that criteria never becomes a pattern.
24
+ *
25
+ * One left-to-right pass; chained replaces cannot express the escape, since by the time a pass
26
+ * could unescape `~*` the `*` has already become `.*`.
23
27
  */
24
- toRegex: (lookupText: string, flags?: any, anchor?: boolean) => RegExp;
28
+ toRegex: (lookupText: string, flags?: any, anchor?: boolean | "start") => RegExp;
25
29
  };
26
30
  //# sourceMappingURL=WildCard.d.ts.map
@@ -1,16 +1,23 @@
1
1
  export * from './Scalar';
2
2
  export * from './ScalarType';
3
+ export * from './ValueKind';
3
4
  export * from './WildCard';
4
5
  export * from './Lambda';
5
6
  export * from './ErrorPolicy';
6
7
  export * from './Repeating';
7
8
  export * from './Flatten';
9
+ export * from './NoLift';
10
+ export * from './NoFilter';
11
+ export * from './ReportType';
8
12
  export * from './Omittable';
13
+ export * from './Lazy';
14
+ export * from './Volatile';
9
15
  export * from './IRange';
10
16
  export * from './IReferenceRange';
11
17
  export * from './IRichData';
12
18
  export * from './IFunction';
13
19
  export * from './IFormulaContext';
20
+ export * from './IFunctionArguments';
14
21
  export * from './LocaleProfile';
15
22
  export * from './IRuntime';
16
23
  export * from './IRangeStats';