@briza/illogical 1.4.3 → 1.5.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.
Files changed (35) hide show
  1. package/changelog.md +13 -0
  2. package/lib/illogical.esm.js +82 -176
  3. package/lib/illogical.js +82 -175
  4. package/package.json +23 -23
  5. package/readme.md +21 -7
  6. package/types/common/evaluable.d.ts +57 -57
  7. package/types/common/type-check.d.ts +28 -32
  8. package/types/common/util.d.ts +11 -11
  9. package/types/expression/comparison/eq.d.ts +18 -22
  10. package/types/expression/comparison/ge.d.ts +18 -22
  11. package/types/expression/comparison/gt.d.ts +18 -22
  12. package/types/expression/comparison/in.d.ts +23 -27
  13. package/types/expression/comparison/index.d.ts +45 -49
  14. package/types/expression/comparison/le.d.ts +18 -22
  15. package/types/expression/comparison/lt.d.ts +18 -22
  16. package/types/expression/comparison/ne.d.ts +18 -22
  17. package/types/expression/comparison/not-in.d.ts +23 -27
  18. package/types/expression/comparison/overlap.d.ts +23 -27
  19. package/types/expression/comparison/prefix.d.ts +23 -27
  20. package/types/expression/comparison/present.d.ts +25 -29
  21. package/types/expression/comparison/suffix.d.ts +23 -27
  22. package/types/expression/comparison/undefined.d.ts +28 -32
  23. package/types/expression/logical/and.d.ts +23 -27
  24. package/types/expression/logical/index.d.ts +32 -36
  25. package/types/expression/logical/nor.d.ts +23 -27
  26. package/types/expression/logical/not.d.ts +23 -27
  27. package/types/expression/logical/or.d.ts +23 -27
  28. package/types/expression/logical/xor.d.ts +23 -27
  29. package/types/index.d.ts +73 -71
  30. package/types/operand/collection.d.ts +36 -40
  31. package/types/operand/index.d.ts +25 -29
  32. package/types/operand/reference.d.ts +44 -48
  33. package/types/operand/value.d.ts +31 -35
  34. package/types/parser/index.d.ts +39 -43
  35. package/types/parser/options.d.ts +61 -65
@@ -1,65 +1,61 @@
1
- /**
2
- * Parser module.
3
- * @module illogical/parser
4
- */
5
- export declare type optionValue = ((operand: string) => string | boolean) | Map<symbol, string>;
6
- export interface Options {
7
- /**
8
- * A function used to determine if the operand is a reference type,
9
- * otherwise evaluated as a static value.
10
- * @param {string} operand
11
- * @return {boolean}
12
- * * True = reference
13
- * * False = value
14
- */
15
- referencePredicate: (operand: string) => boolean;
16
- /**
17
- * A function used to transform the operand into the reference annotation
18
- * stripped form. I.e. remove any annotation used to detect the
19
- * reference type.
20
- * E.g. "$Reference" => "Reference"
21
- * @param {string} operand
22
- * @return {string}
23
- */
24
- referenceTransform: (operand: string) => string;
25
- /**
26
- * A function used to transform the stripped form of a reference into an
27
- * annotated version of the reference. This function should be the inverse
28
- * function of referenceTranform.
29
- *
30
- * referenceSerialization(referenceTransform("$Reference")) === '$Reference'
31
- *
32
- * E.g. "Reference" => "$Reference"
33
- * @param {string} operand
34
- * @return {string}
35
- */
36
- referenceSerialization: (operand: string) => string;
37
- /**
38
- * Mapping of the operators. The key is unique operator key, and the value
39
- * is the key used to represent the given operator in the raw expression.
40
- */
41
- operatorMapping: Map<symbol, string>;
42
- [k: string]: optionValue;
43
- }
44
- /**
45
- * Default reference predicate.
46
- * The "$" symbol at the begging of the operand is used
47
- * to predicate the reference type.
48
- * E.g. "$State", "$Country"
49
- * @param {string} key
50
- * @return {boolean}
51
- */
52
- export declare function defaultReferencePredicate(key: string): boolean;
53
- /**
54
- * Default reference transform.
55
- * It removes the "$" symbol at the begging of the operand name.
56
- * @param {string} key
57
- * @return {string}
58
- */
59
- export declare function defaultReferenceTransform(key: string): string;
60
- export declare function defaultReferenceSerialization(key: string): string;
61
- export declare const defaultOperatorMapping: Map<symbol, string>;
62
- /**
63
- * Default parser options
64
- */
65
- export declare const defaultOptions: Options;
1
+ export declare type optionValue = ((operand: string) => string | boolean) | Map<symbol, string>;
2
+ export interface Options {
3
+ /**
4
+ * A function used to determine if the operand is a reference type,
5
+ * otherwise evaluated as a static value.
6
+ * @param {string} operand
7
+ * @return {boolean}
8
+ * * True = reference
9
+ * * False = value
10
+ */
11
+ referencePredicate: (operand: string) => boolean;
12
+ /**
13
+ * A function used to transform the operand into the reference annotation
14
+ * stripped form. I.e. remove any annotation used to detect the
15
+ * reference type.
16
+ * E.g. "$Reference" => "Reference"
17
+ * @param {string} operand
18
+ * @return {string}
19
+ */
20
+ referenceTransform: (operand: string) => string;
21
+ /**
22
+ * A function used to transform the stripped form of a reference into an
23
+ * annotated version of the reference. This function should be the inverse
24
+ * function of referenceTranform.
25
+ *
26
+ * referenceSerialization(referenceTransform("$Reference")) === '$Reference'
27
+ *
28
+ * E.g. "Reference" => "$Reference"
29
+ * @param {string} operand
30
+ * @return {string}
31
+ */
32
+ referenceSerialization: (operand: string) => string;
33
+ /**
34
+ * Mapping of the operators. The key is unique operator key, and the value
35
+ * is the key used to represent the given operator in the raw expression.
36
+ */
37
+ operatorMapping: Map<symbol, string>;
38
+ [k: string]: optionValue;
39
+ }
40
+ /**
41
+ * Default reference predicate.
42
+ * The "$" symbol at the begging of the operand is used
43
+ * to predicate the reference type.
44
+ * E.g. "$State", "$Country"
45
+ * @param {string} key
46
+ * @return {boolean}
47
+ */
48
+ export declare function defaultReferencePredicate(key: string): boolean;
49
+ /**
50
+ * Default reference transform.
51
+ * It removes the "$" symbol at the begging of the operand name.
52
+ * @param {string} key
53
+ * @return {string}
54
+ */
55
+ export declare function defaultReferenceTransform(key: string): string;
56
+ export declare function defaultReferenceSerialization(key: string): string;
57
+ export declare const defaultOperatorMapping: Map<symbol, string>;
58
+ /**
59
+ * Default parser options
60
+ */
61
+ export declare const defaultOptions: Options;