Methods
convertToConfigObject(fieldName, value) → {Object}
Convert config from ('fieldName', value) format to a partial config object.
E. g. from ('manifest.retryParameters.maxAttempts', 1) to
{ manifest: { retryParameters: { maxAttempts: 1 }}}.
Parameters:
Name | Type | Description |
---|---|---|
fieldName |
string | |
value |
* |
- Source:
Returns:
- Type
- Object
mergeConfigObjects(destinationnon-null, sourcenon-null, templatenon-null, overridesnon-null, path) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
destination |
Object | |
source |
Object | |
template |
Object | supplies default values |
overrides |
Object | Supplies override type checking. When the current path matches the key in this object, each sub-value must match the type in this object. If this contains an Object, it is used as the template. |
path |
string | to this part of the config |
- Source:
Returns:
- Type
- boolean
referenceParametersAndReturn(parametersnon-null, returnValue) → {T}
Reference the input parameters so the compiler doesn't remove them from
the calling function. Return whatever value is specified.
This allows an empty or default implementation of a config callback that
still bears the complete function signature even in compiled mode.
The caller should look something like this:
const callback = (a, b, c, d) => {
return referenceParametersAndReturn(
[a, b, c, d],
a); // Can be anything, doesn't need to be one of the parameters
};
Parameters:
Name | Type | Description |
---|---|---|
parameters |
Array.<?> | |
returnValue |
T |
- Source:
Returns:
- Type
- T