@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.
- package/changelog.md +13 -0
- package/lib/illogical.esm.js +82 -176
- package/lib/illogical.js +82 -175
- package/package.json +23 -23
- package/readme.md +21 -7
- package/types/common/evaluable.d.ts +57 -57
- package/types/common/type-check.d.ts +28 -32
- package/types/common/util.d.ts +11 -11
- package/types/expression/comparison/eq.d.ts +18 -22
- package/types/expression/comparison/ge.d.ts +18 -22
- package/types/expression/comparison/gt.d.ts +18 -22
- package/types/expression/comparison/in.d.ts +23 -27
- package/types/expression/comparison/index.d.ts +45 -49
- package/types/expression/comparison/le.d.ts +18 -22
- package/types/expression/comparison/lt.d.ts +18 -22
- package/types/expression/comparison/ne.d.ts +18 -22
- package/types/expression/comparison/not-in.d.ts +23 -27
- package/types/expression/comparison/overlap.d.ts +23 -27
- package/types/expression/comparison/prefix.d.ts +23 -27
- package/types/expression/comparison/present.d.ts +25 -29
- package/types/expression/comparison/suffix.d.ts +23 -27
- package/types/expression/comparison/undefined.d.ts +28 -32
- package/types/expression/logical/and.d.ts +23 -27
- package/types/expression/logical/index.d.ts +32 -36
- package/types/expression/logical/nor.d.ts +23 -27
- package/types/expression/logical/not.d.ts +23 -27
- package/types/expression/logical/or.d.ts +23 -27
- package/types/expression/logical/xor.d.ts +23 -27
- package/types/index.d.ts +73 -71
- package/types/operand/collection.d.ts +36 -40
- package/types/operand/index.d.ts +25 -29
- package/types/operand/reference.d.ts +44 -48
- package/types/operand/value.d.ts +31 -35
- package/types/parser/index.d.ts +39 -43
- package/types/parser/options.d.ts +61 -65
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* @
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* {@link Comparison.comparison}
|
|
20
|
-
*/
|
|
21
|
-
comparison(left: Result, right: Result): boolean;
|
|
22
|
-
}
|
|
1
|
+
import { Evaluable, Result } from '../../common/evaluable';
|
|
2
|
+
import { Comparison } from '../comparison';
|
|
3
|
+
export declare const OPERATOR: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* Not equal comparison expression
|
|
6
|
+
*/
|
|
7
|
+
export declare class NotEqual extends Comparison {
|
|
8
|
+
/**
|
|
9
|
+
* @constructor
|
|
10
|
+
* @param {Evaluable} left Left operand.
|
|
11
|
+
* @param {Evaluable} right Right operand.
|
|
12
|
+
*/
|
|
13
|
+
constructor(...args: Evaluable[]);
|
|
14
|
+
/**
|
|
15
|
+
* {@link Comparison.comparison}
|
|
16
|
+
*/
|
|
17
|
+
comparison(left: Result, right: Result): boolean;
|
|
18
|
+
}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* @
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* @return {string}
|
|
25
|
-
*/
|
|
26
|
-
toString(): string;
|
|
27
|
-
}
|
|
1
|
+
import { Evaluable, Result } from '../../common/evaluable';
|
|
2
|
+
import { Comparison } from '../comparison';
|
|
3
|
+
export declare const OPERATOR: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* Not in comparison expression
|
|
6
|
+
*/
|
|
7
|
+
export declare class NotIn extends Comparison {
|
|
8
|
+
/**
|
|
9
|
+
* @constructor
|
|
10
|
+
* @param {Evaluable} left Left operand.
|
|
11
|
+
* @param {Evaluable} right Right operand.
|
|
12
|
+
*/
|
|
13
|
+
constructor(...args: Evaluable[]);
|
|
14
|
+
/**
|
|
15
|
+
* {@link Comparison.comparison}
|
|
16
|
+
*/
|
|
17
|
+
comparison(left: Result, right: Result): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get the strict representation of the expression
|
|
20
|
+
* @return {string}
|
|
21
|
+
*/
|
|
22
|
+
toString(): string;
|
|
23
|
+
}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* @
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* @return {string}
|
|
25
|
-
*/
|
|
26
|
-
toString(): string;
|
|
27
|
-
}
|
|
1
|
+
import { Evaluable, Result } from '../../common/evaluable';
|
|
2
|
+
import { Comparison } from '../comparison';
|
|
3
|
+
export declare const OPERATOR: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* Overlap comparison expression
|
|
6
|
+
*/
|
|
7
|
+
export declare class Overlap extends Comparison {
|
|
8
|
+
/**
|
|
9
|
+
* @constructor
|
|
10
|
+
* @param {Evaluable} left Left operand.
|
|
11
|
+
* @param {Evaluable} right Right operand.
|
|
12
|
+
*/
|
|
13
|
+
constructor(...args: Evaluable[]);
|
|
14
|
+
/**
|
|
15
|
+
* {@link Comparison.comparison}
|
|
16
|
+
*/
|
|
17
|
+
comparison(left: Result, right: Result): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get the strict representation of the expression.
|
|
20
|
+
* @return {string}
|
|
21
|
+
*/
|
|
22
|
+
toString(): string;
|
|
23
|
+
}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* @
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* @return {string}
|
|
25
|
-
*/
|
|
26
|
-
toString(): string;
|
|
27
|
-
}
|
|
1
|
+
import { Evaluable, Result } from '../../common/evaluable';
|
|
2
|
+
import { Comparison } from '../comparison';
|
|
3
|
+
export declare const OPERATOR: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* Prefix comparison expression
|
|
6
|
+
*/
|
|
7
|
+
export declare class Prefix extends Comparison {
|
|
8
|
+
/**
|
|
9
|
+
* @constructor
|
|
10
|
+
* @param {Evaluable} left Left operand.
|
|
11
|
+
* @param {Evaluable} right Right operand.
|
|
12
|
+
*/
|
|
13
|
+
constructor(...args: Evaluable[]);
|
|
14
|
+
/**
|
|
15
|
+
* {@link Comparison.comparison}
|
|
16
|
+
*/
|
|
17
|
+
comparison(left: Result, right: Result): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get the strict representation of the expression.
|
|
20
|
+
* @return {string}
|
|
21
|
+
*/
|
|
22
|
+
toString(): string;
|
|
23
|
+
}
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
*/
|
|
27
|
-
toString(): string;
|
|
28
|
-
serialize(options: Options): ExpressionInput;
|
|
29
|
-
}
|
|
1
|
+
import { Evaluable, Result } from '../../common/evaluable';
|
|
2
|
+
import { ExpressionInput } from '../../parser';
|
|
3
|
+
import { Options } from '../../parser/options';
|
|
4
|
+
import { Comparison } from './index';
|
|
5
|
+
export declare const OPERATOR: unique symbol;
|
|
6
|
+
/**
|
|
7
|
+
* Present comparison expression
|
|
8
|
+
*/
|
|
9
|
+
export declare class Present extends Comparison {
|
|
10
|
+
/**
|
|
11
|
+
* @constructor
|
|
12
|
+
* @param {Evaluable} operand
|
|
13
|
+
*/
|
|
14
|
+
constructor(...args: Evaluable[]);
|
|
15
|
+
/**
|
|
16
|
+
* {@link Comparison.comparison}
|
|
17
|
+
*/
|
|
18
|
+
comparison(left: Result): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Get the strict representation of the expression.
|
|
21
|
+
* @return {string}
|
|
22
|
+
*/
|
|
23
|
+
toString(): string;
|
|
24
|
+
serialize(options: Options): ExpressionInput;
|
|
25
|
+
}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* @
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* @return {string}
|
|
25
|
-
*/
|
|
26
|
-
toString(): string;
|
|
27
|
-
}
|
|
1
|
+
import { Evaluable, Result } from '../../common/evaluable';
|
|
2
|
+
import { Comparison } from '../comparison';
|
|
3
|
+
export declare const OPERATOR: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* Suffix comparison expression
|
|
6
|
+
*/
|
|
7
|
+
export declare class Suffix extends Comparison {
|
|
8
|
+
/**
|
|
9
|
+
* @constructor
|
|
10
|
+
* @param {Evaluable} left Left operand.
|
|
11
|
+
* @param {Evaluable} right Right operand.
|
|
12
|
+
*/
|
|
13
|
+
constructor(...args: Evaluable[]);
|
|
14
|
+
/**
|
|
15
|
+
* {@link Comparison.comparison}
|
|
16
|
+
*/
|
|
17
|
+
comparison(left: Result, right: Result): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get the strict representation of the expression.
|
|
20
|
+
* @return {string}
|
|
21
|
+
*/
|
|
22
|
+
toString(): string;
|
|
23
|
+
}
|
|
@@ -1,32 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* @
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* {@link Evaluable.serialize}
|
|
30
|
-
*/
|
|
31
|
-
serialize(options: Options): ExpressionInput;
|
|
32
|
-
}
|
|
1
|
+
import { Evaluable, Result } from '../../common/evaluable';
|
|
2
|
+
import { ExpressionInput } from '../../parser';
|
|
3
|
+
import { Options } from '../../parser/options';
|
|
4
|
+
import { Comparison } from '../comparison';
|
|
5
|
+
export declare const OPERATOR: unique symbol;
|
|
6
|
+
/**
|
|
7
|
+
* Undefined comparison expression
|
|
8
|
+
*/
|
|
9
|
+
export declare class Undefined extends Comparison {
|
|
10
|
+
/**
|
|
11
|
+
* @constructor
|
|
12
|
+
* @param {Evaluable} operand
|
|
13
|
+
*/
|
|
14
|
+
constructor(...args: Evaluable[]);
|
|
15
|
+
/**
|
|
16
|
+
* {@link Comparison.comparison}
|
|
17
|
+
*/
|
|
18
|
+
comparison(left: Result): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Get the strict representation of the expression.
|
|
21
|
+
* @return {string}
|
|
22
|
+
*/
|
|
23
|
+
toString(): string;
|
|
24
|
+
/**
|
|
25
|
+
* {@link Evaluable.serialize}
|
|
26
|
+
*/
|
|
27
|
+
serialize(options: Options): ExpressionInput;
|
|
28
|
+
}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* @
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* {@link Evaluable.simplify}
|
|
25
|
-
*/
|
|
26
|
-
simplify(...args: [Context, string[]]): boolean | Evaluable;
|
|
27
|
-
}
|
|
1
|
+
import { Context, Evaluable, Result, SimplifyArgs } from '../../common/evaluable';
|
|
2
|
+
import { Logical } from '../logical';
|
|
3
|
+
export declare const OPERATOR: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* And logical expression
|
|
6
|
+
*/
|
|
7
|
+
export declare class And extends Logical {
|
|
8
|
+
/**
|
|
9
|
+
* @constructor
|
|
10
|
+
* @param {Evaluable[]} operands Collection of operands.
|
|
11
|
+
*/
|
|
12
|
+
constructor(operands: Evaluable[]);
|
|
13
|
+
/**
|
|
14
|
+
* Evaluate in the given context.
|
|
15
|
+
* @param {Context} ctx
|
|
16
|
+
* @return {Result}
|
|
17
|
+
*/
|
|
18
|
+
evaluate(ctx: Context): Result;
|
|
19
|
+
/**
|
|
20
|
+
* {@link Evaluable.simplify}
|
|
21
|
+
*/
|
|
22
|
+
simplify(...args: SimplifyArgs): boolean | Evaluable;
|
|
23
|
+
}
|
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* @
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* {@link Evaluable.
|
|
24
|
-
*/
|
|
25
|
-
abstract
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*/
|
|
34
|
-
toString(): string;
|
|
35
|
-
serialize(options: Options): ExpressionInput;
|
|
36
|
-
}
|
|
1
|
+
import { Context, Evaluable, EvaluableType, Result } from '../../common/evaluable';
|
|
2
|
+
import { ExpressionInput } from '../../parser';
|
|
3
|
+
import { Options } from '../../parser/options';
|
|
4
|
+
/**
|
|
5
|
+
* Abstract logical expression
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class Logical implements Evaluable {
|
|
8
|
+
protected readonly operator: string;
|
|
9
|
+
protected readonly operatorSymbol: symbol;
|
|
10
|
+
protected readonly operands: Evaluable[];
|
|
11
|
+
type: EvaluableType;
|
|
12
|
+
/**
|
|
13
|
+
* @constructor
|
|
14
|
+
* @param {string} operator String representation of the operator.
|
|
15
|
+
* @param {Evaluable[]} operands Collection of operands.
|
|
16
|
+
*/
|
|
17
|
+
constructor(operator: string, operatorSymbol: symbol, operands: Evaluable[]);
|
|
18
|
+
/**
|
|
19
|
+
* {@link Evaluable.evaluate}
|
|
20
|
+
*/
|
|
21
|
+
abstract evaluate(ctx: Context): Result;
|
|
22
|
+
/**
|
|
23
|
+
* {@link Evaluable.simplify}
|
|
24
|
+
*/
|
|
25
|
+
abstract simplify(ctx: Context, strictKeys?: string[], optionalKeys?: string[]): Result | Evaluable;
|
|
26
|
+
/**
|
|
27
|
+
* Get the strict representation of the expression.
|
|
28
|
+
* @return {string}
|
|
29
|
+
*/
|
|
30
|
+
toString(): string;
|
|
31
|
+
serialize(options: Options): ExpressionInput;
|
|
32
|
+
}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* @
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* {@link Evaluable.simplify}
|
|
25
|
-
*/
|
|
26
|
-
simplify(...args: [Context, string[]]): boolean | Evaluable;
|
|
27
|
-
}
|
|
1
|
+
import { Context, Evaluable, Result, SimplifyArgs } from '../../common/evaluable';
|
|
2
|
+
import { Logical } from '../logical';
|
|
3
|
+
export declare const OPERATOR: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* Nor logical expression
|
|
6
|
+
*/
|
|
7
|
+
export declare class Nor extends Logical {
|
|
8
|
+
/**
|
|
9
|
+
* @constructor
|
|
10
|
+
* @param {Evaluable[]} operands Collection of operands.
|
|
11
|
+
*/
|
|
12
|
+
constructor(operands: Evaluable[]);
|
|
13
|
+
/**
|
|
14
|
+
* Evaluate in the given context.
|
|
15
|
+
* @param {Context} ctx
|
|
16
|
+
* @return {Result}
|
|
17
|
+
*/
|
|
18
|
+
evaluate(ctx: Context): Result;
|
|
19
|
+
/**
|
|
20
|
+
* {@link Evaluable.simplify}
|
|
21
|
+
*/
|
|
22
|
+
simplify(...args: SimplifyArgs): boolean | Evaluable;
|
|
23
|
+
}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* @
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* {@link Evaluable.simplify}
|
|
25
|
-
*/
|
|
26
|
-
simplify(...args: [Context, string[]]): boolean | Evaluable;
|
|
27
|
-
}
|
|
1
|
+
import { Context, Evaluable, Result, SimplifyArgs } from '../../common/evaluable';
|
|
2
|
+
import { Logical } from '.';
|
|
3
|
+
export declare const OPERATOR: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* Not logical expression
|
|
6
|
+
*/
|
|
7
|
+
export declare class Not extends Logical {
|
|
8
|
+
/**
|
|
9
|
+
* @constructor
|
|
10
|
+
* @param {Evaluable} operand
|
|
11
|
+
*/
|
|
12
|
+
constructor(...args: Evaluable[]);
|
|
13
|
+
/**
|
|
14
|
+
* Evaluate in the given context.
|
|
15
|
+
* @param {Context} ctx
|
|
16
|
+
* @return {Result}
|
|
17
|
+
*/
|
|
18
|
+
evaluate(ctx: Context): Result;
|
|
19
|
+
/**
|
|
20
|
+
* {@link Evaluable.simplify}
|
|
21
|
+
*/
|
|
22
|
+
simplify(...args: SimplifyArgs): boolean | Evaluable;
|
|
23
|
+
}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* @
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* {@link Evaluable.simplify}
|
|
25
|
-
*/
|
|
26
|
-
simplify(...args: [Context, string[]]): boolean | Evaluable;
|
|
27
|
-
}
|
|
1
|
+
import { Context, Evaluable, Result, SimplifyArgs } from '../../common/evaluable';
|
|
2
|
+
import { Logical } from '../logical';
|
|
3
|
+
export declare const OPERATOR: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* Or logical expression
|
|
6
|
+
*/
|
|
7
|
+
export declare class Or extends Logical {
|
|
8
|
+
/**
|
|
9
|
+
* @constructor
|
|
10
|
+
* @param {Evaluable[]} operands Collection of operands.
|
|
11
|
+
*/
|
|
12
|
+
constructor(operands: Evaluable[]);
|
|
13
|
+
/**
|
|
14
|
+
* Evaluate in the given context.
|
|
15
|
+
* @param {Context} ctx
|
|
16
|
+
* @return {Result}
|
|
17
|
+
*/
|
|
18
|
+
evaluate(ctx: Context): Result;
|
|
19
|
+
/**
|
|
20
|
+
* {@link Evaluable.simplify}
|
|
21
|
+
*/
|
|
22
|
+
simplify(...args: SimplifyArgs): boolean | Evaluable;
|
|
23
|
+
}
|