@cobol-ts/cel-types 0.0.11 → 0.0.13
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.
- package/README.md +2 -0
- package/dist/src/cel.types.d.ts +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,3 +3,5 @@
|
|
|
3
3
|
Type-only contracts for scalar CEL values, compiled evaluation functions, pluggable ordinary functions, and the throw/continue evaluation policy. The module does not depend on a specific reader, source format, or CEL parsing implementation.
|
|
4
4
|
|
|
5
5
|
The initial runtime kinds are `int`, `uint`, `double`, `string`, `bool`, `null`. This is the scalar execution representation, not an alternative source-projection authority. Physical source/projection type metadata determines how a field is decoded and represented.
|
|
6
|
+
|
|
7
|
+
Collection compilation adds `CompiledCelCollectionExpression` and recursive `CelCollectionValue` for materialised lists, including nested lists and selected shallow source objects. These are separate from `CelValue`: the current graph accumulator is deliberately still scalar.
|
package/dist/src/cel.types.d.ts
CHANGED
|
@@ -23,3 +23,13 @@ export interface CelFunction {
|
|
|
23
23
|
readonly returns: CelScalarKind;
|
|
24
24
|
invoke(...args: CelValue[]): CelValue;
|
|
25
25
|
}
|
|
26
|
+
/** Materialised collection result, including nested lists and source objects. */
|
|
27
|
+
export interface CelCollectionObject {
|
|
28
|
+
readonly [key: string]: CelCollectionValue;
|
|
29
|
+
}
|
|
30
|
+
export type CelCollectionValue = CelValue | readonly CelCollectionValue[] | CelCollectionObject;
|
|
31
|
+
export interface CompiledCelCollectionExpression<R, I extends readonly number[]> {
|
|
32
|
+
readonly type: 'list';
|
|
33
|
+
readonly elementType: CelScalarKind | 'object' | 'list';
|
|
34
|
+
run(record: R, indices: I): readonly CelCollectionValue[];
|
|
35
|
+
}
|