- Source:
- Since:
- 1.0.0
Data classes
Methods
(static) ArgumentType(argumentType) → {object}
- Source:
Create a new argument type
Parameters:
Name | Type | Description |
---|---|---|
argumentType |
Object | argumentType |
type.argumentType_id |
string | argumentType_id |
type.component |
* | this attribute will be used by the UI Framework adapter |
Returns:
ArgumentType
- Type
- object
(static) ComparisonPredicate(target, operator, argument) → {Promise.<dataclasses.ComparisonPredicate>}
- Source:
A specialized predicate that you use to compare expressions.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
target |
dataclasses.Target | target | |
operator |
dataclasses.Operator | operator | |
argument |
* |
null
|
argument |
Returns:
yield a ComparisonPredicate or a rejected promise
- Type
- Promise.<dataclasses.ComparisonPredicate>
(static) ComparisonPredicate.is(predicate) → {Boolean}
- Source:
Yield true if `predicate` is a ComparisonPredicate
Parameters:
Name | Type | Description |
---|---|---|
predicate |
dataclasses.Predicate | dataclasses.Predicate |
Returns:
true if `predicate` is a ComparisonPredicate
- Type
- Boolean
(static) CompoundPredicate(logic, predicates) → {Promise.<dataclasses.CompoundPredicate>}
- Source:
A specialized predicate that evaluates logical combinations of other predicates.
Parameters:
Name | Type | Description |
---|---|---|
logic |
dataclasses.LogicalType | The predicate logic |
predicates |
Array.<dataclasses.Predicate> | predicates predicates |
Returns:
yield a dataclasses.CompoundPredicate or a errors.CompoundPredicateMustHaveAtLeastOneSubPredicate rejected promise
- Type
- Promise.<dataclasses.CompoundPredicate>
(static) CompoundPredicate.forEach(compoundPredicate, f(predicate)) → {undefined}
- Source:
Walk through the predicates tree
Parameters:
Name | Type | Description |
---|---|---|
compoundPredicate |
dataclasses.CompoundPredicate | starter node |
f(predicate) |
function | iterator function |
Returns:
- Type
- undefined
(static) CompoundPredicate.is(predicate) → {Boolean}
- Source:
Yield true if `predicate` is a CompoundPredicate
Parameters:
Name | Type | Description |
---|---|---|
predicate |
dataclasses.Predicate | predicate |
Returns:
true if `predicate` is a CompoundPredicate
- Type
- Boolean
(static) CompoundPredicate.reduce(compoundPredicate, f, acc, parentsopt) → {T}
- Source:
Reduce through the predicates tree
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
compoundPredicate |
dataclasses.CompoundPredicate | starter node | ||
f |
function | accumulation function, f(acc, predicate, parents) | ||
acc |
T | accumulator | ||
parents |
Array |
<optional> |
[]
|
path to the node, array of parents |
Returns:
yield the accumulator
- Type
- T
(static) LogicalType(logicalType) → {object}
- Source:
Create a new type logical type
Logical types or used in CompoundPredicates
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
logicalType |
Object | The predicate logic
Properties
|
Returns:
logicalType object
- Type
- object
(static) Operator(operator) → {Operator}
- Source:
Create a new operator
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operator |
object | operator
Properties
|
Returns:
- Type
- Operator
(static) Predicate(type) → {dataclasses.Predicate}
- Source:
Abstract Predicate type, a Predicate is the union type of CompoundPredicate | ComparisonPredicate
Parameters:
Name | Type | Description |
---|---|---|
type |
function | Predicate subtype function constructor |
Returns:
predicate
(static) Target(target) → {Target}
- Source:
Create a new target
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
target |
object | target
Properties
|
Returns:
- Type
- Target
(static) Type(type) → {Type}
- Source:
Create a new type
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
type |
Object | type
Properties
|
Returns:
- Type
- Type
Type Definitions
ComparisonPredicate
- Source:
Abstract Predicate type, a Predicate is the union type of CompoundPredicate | ComparisonPredicate
Type:
- object
Operator
- Source:
A type operator
Predicate
- Source:
Abstract Predicate type, a Predicate is the union type of CompoundPredicate | ComparisonPredicate
Type:
- object
Target
- Source:
Target type definition
Type:
- Object
Type
- Source:
Defines a target type