pareto-core 0.1.0
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/dist/__internals/async/asynchronous_collection_builder.d.ts +12 -0
- package/dist/__internals/async/asynchronous_collection_builder.js +35 -0
- package/dist/__internals/async/create_asynchronous_processes_monitor.d.ts +15 -0
- package/dist/__internals/async/create_asynchronous_processes_monitor.js +53 -0
- package/dist/__internals/async/create_refinement_context.d.ts +5 -0
- package/dist/__internals/async/create_refinement_context.js +29 -0
- package/dist/__internals/sync/expression/decide/index.d.ts +6 -0
- package/dist/__internals/sync/expression/decide/index.js +10 -0
- package/dist/__internals/sync/expression/decide/state_group/assert_unreachable.d.ts +15 -0
- package/dist/__internals/sync/expression/decide/state_group/assert_unreachable.js +21 -0
- package/dist/__internals/sync/expression/decide/state_group/select.d.ts +15 -0
- package/dist/__internals/sync/expression/decide/state_group/select.js +21 -0
- package/dist/__internals/sync/expression/decide/state_group/switch_state.d.ts +19 -0
- package/dist/__internals/sync/expression/decide/state_group/switch_state.js +24 -0
- package/dist/__internals/sync/expression/initialize.d.ts +66 -0
- package/dist/__internals/sync/expression/initialize.js +302 -0
- package/dist/__internals/sync/expression/literals/dictionary.d.ts +11 -0
- package/dist/__internals/sync/expression/literals/dictionary.js +110 -0
- package/dist/__internals/sync/expression/literals/list.d.ts +2 -0
- package/dist/__internals/sync/expression/literals/list.js +90 -0
- package/dist/__internals/sync/expression/literals/optional.d.ts +3 -0
- package/dist/__internals/sync/expression/literals/optional.js +48 -0
- package/dist/__internals/sync/expression/special.d.ts +49 -0
- package/dist/__internals/sync/expression/special.js +107 -0
- package/dist/__internals/sync/extracts/literal.d.ts +20 -0
- package/dist/__internals/sync/extracts/literal.js +54 -0
- package/dist/__internals/sync/get_location_info.d.ts +8 -0
- package/dist/__internals/sync/get_location_info.js +41 -0
- package/dist/command/Command_Block.d.ts +3 -0
- package/dist/command/Command_Block.js +3 -0
- package/dist/command/command.d.ts +2 -0
- package/dist/command/command.js +19 -0
- package/dist/command/command_procedure.d.ts +3 -0
- package/dist/command/command_procedure.js +22 -0
- package/dist/command/command_promise.d.ts +17 -0
- package/dist/command/command_promise.js +29 -0
- package/dist/command/handle_command_block.d.ts +3 -0
- package/dist/command/handle_command_block.js +21 -0
- package/dist/command/index.d.ts +10 -0
- package/dist/command/index.js +29 -0
- package/dist/command/statement.d.ts +27 -0
- package/dist/command/statement.js +271 -0
- package/dist/deserializer.d.ts +4 -0
- package/dist/deserializer.js +15 -0
- package/dist/interface/Deprecated_Source_Location.d.ts +5 -0
- package/dist/interface/Deprecated_Source_Location.js +3 -0
- package/dist/interface/Raw_Optional_Value.d.ts +1 -0
- package/dist/interface/Raw_Optional_Value.js +3 -0
- package/dist/interface/algorithm_signatures/Command.d.ts +8 -0
- package/dist/interface/algorithm_signatures/Command.js +3 -0
- package/dist/interface/algorithm_signatures/Deserializer.d.ts +17 -0
- package/dist/interface/algorithm_signatures/Deserializer.js +3 -0
- package/dist/interface/algorithm_signatures/Production.d.ts +6 -0
- package/dist/interface/algorithm_signatures/Production.js +3 -0
- package/dist/interface/algorithm_signatures/Query.d.ts +3 -0
- package/dist/interface/algorithm_signatures/Query.js +3 -0
- package/dist/interface/algorithm_signatures/Query_Function.d.ts +1 -0
- package/dist/interface/algorithm_signatures/Query_Function.js +3 -0
- package/dist/interface/algorithm_signatures/Refiner.d.ts +5 -0
- package/dist/interface/algorithm_signatures/Refiner.js +3 -0
- package/dist/interface/algorithm_signatures/Serializer.d.ts +9 -0
- package/dist/interface/algorithm_signatures/Serializer.js +3 -0
- package/dist/interface/algorithm_signatures/Transformer.d.ts +2 -0
- package/dist/interface/algorithm_signatures/Transformer.js +3 -0
- package/dist/interface/data/Circular_Dependency.d.ts +8 -0
- package/dist/interface/data/Circular_Dependency.js +3 -0
- package/dist/interface/data/Dictionary.d.ts +29 -0
- package/dist/interface/data/Dictionary.js +3 -0
- package/dist/interface/data/List.d.ts +26 -0
- package/dist/interface/data/List.js +3 -0
- package/dist/interface/data/Optional_Value.d.ts +16 -0
- package/dist/interface/data/Optional_Value.js +3 -0
- package/dist/interface/globals.d.ts +20 -0
- package/dist/interface/globals.js +2 -0
- package/dist/interface/index.d.ts +14 -0
- package/dist/interface/index.js +31 -0
- package/dist/interface/interfaces.d.ts +54 -0
- package/dist/interface/interfaces.js +3 -0
- package/dist/query/expression.d.ts +6 -0
- package/dist/query/expression.js +49 -0
- package/dist/query/index.d.ts +6 -0
- package/dist/query/index.js +23 -0
- package/dist/query/query.d.ts +4 -0
- package/dist/query/query.js +15 -0
- package/dist/query/query_function.d.ts +2 -0
- package/dist/query/query_function.js +15 -0
- package/dist/query/query_result.d.ts +10 -0
- package/dist/query/query_result.js +97 -0
- package/dist/refiner/index.d.ts +8 -0
- package/dist/refiner/index.js +45 -0
- package/dist/refiner/resolve.d.ts +176 -0
- package/dist/refiner/resolve.js +289 -0
- package/dist/serializer.d.ts +6 -0
- package/dist/serializer.js +33 -0
- package/dist/transformer/deprecated_shorthands_for_unresolved.d.ts +40 -0
- package/dist/transformer/deprecated_shorthands_for_unresolved.js +77 -0
- package/dist/transformer/index.d.ts +4 -0
- package/dist/transformer/index.js +24 -0
- package/package.json +26 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Raw_Optional_Value } from "./Raw_Optional_Value";
|
|
2
|
+
import { Transformer } from "./algorithm_signatures/Transformer";
|
|
3
|
+
import { Circular_Dependency } from "./data/Circular_Dependency";
|
|
4
|
+
export type Abort<Error> = (error: Error) => never;
|
|
5
|
+
export type Acyclic_Lookup<Type> = {
|
|
6
|
+
'get entry': (key: string, abort: {
|
|
7
|
+
'no context lookup': Abort<null>;
|
|
8
|
+
'no such entry': Abort<string>;
|
|
9
|
+
'cyclic': Abort<string[]>;
|
|
10
|
+
}) => Type;
|
|
11
|
+
'get possible entry': (key: string, abort: {
|
|
12
|
+
'no context lookup': Abort<null>;
|
|
13
|
+
'cyclic': Abort<string[]>;
|
|
14
|
+
}) => Raw_Optional_Value<Type>;
|
|
15
|
+
};
|
|
16
|
+
export type Cyclic_Lookup<Type> = {
|
|
17
|
+
'get entry': (key: string, abort: {
|
|
18
|
+
'no context lookup': Abort<null>;
|
|
19
|
+
'no such entry': Abort<string>;
|
|
20
|
+
'accessing cyclic before resolved': Abort<null>;
|
|
21
|
+
}) => Circular_Dependency<Type>;
|
|
22
|
+
};
|
|
23
|
+
export type Iterator<Element> = {
|
|
24
|
+
'look': () => Raw_Optional_Value<Element>;
|
|
25
|
+
'look ahead': (offset: number) => Raw_Optional_Value<Element>;
|
|
26
|
+
'consume': <T>(callback: (value: Element, position: number) => T, abort: Abort<number>) => T;
|
|
27
|
+
'discard': <T>(callback: () => T) => T;
|
|
28
|
+
'get position': () => number;
|
|
29
|
+
'assert finished': <T>(callback: () => T, abort: Abort<null>) => T;
|
|
30
|
+
};
|
|
31
|
+
export type Queryer<Output, Error, Input> = ($: Input) => Query_Result<Output, Error>;
|
|
32
|
+
export interface Query_Result<Output, Error> {
|
|
33
|
+
query_result: null;
|
|
34
|
+
transform_result<New_Output>(transformer: Transformer<Output, New_Output>): Query_Result<New_Output, Error>;
|
|
35
|
+
query_without_error_transformation<New_Output>(query: Queryer<New_Output, Error, Output>): Query_Result<New_Output, Error>;
|
|
36
|
+
refine_without_error_transformation<New_Output>(callback: ($: Output, abort: Abort<Error>) => New_Output): Query_Result<New_Output, Error>;
|
|
37
|
+
rework_error_temp<New_Error, Rework_Error>(error_reworker: Queryer<New_Error, Rework_Error, Error>,
|
|
38
|
+
/**
|
|
39
|
+
* if the reworker fails, we need to transform *that* error into the New_Error
|
|
40
|
+
*/
|
|
41
|
+
rework_error_transformer: Transformer<Rework_Error, New_Error>): Query_Result<Output, New_Error>;
|
|
42
|
+
__extract_data: (on_success: ($: Output) => void, on_error: ($: Error) => void) => void;
|
|
43
|
+
}
|
|
44
|
+
export type Stack_Lookup<Type> = {
|
|
45
|
+
'get entry': (key: string, abort: {
|
|
46
|
+
'no context lookup': Abort<null>;
|
|
47
|
+
'no such entry': Abort<string>;
|
|
48
|
+
'cyclic': Abort<string[]>;
|
|
49
|
+
}) => Type;
|
|
50
|
+
};
|
|
51
|
+
export type Text_Builder = {
|
|
52
|
+
'add snippet': ($: string) => void;
|
|
53
|
+
'add character': ($: number) => void;
|
|
54
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbnRlcmZhY2UvaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as _pi from "../interface";
|
|
2
|
+
export declare namespace dictionaryx {
|
|
3
|
+
const parallel: <Result, Error, Entry_Error>(dictionary: _pi.Dictionary<_pi.Query_Result<Result, Entry_Error>>, aggregate_errors: _pi.Transformer<_pi.Dictionary<Entry_Error>, Error>) => _pi.Query_Result<_pi.Dictionary<Result>, Error>;
|
|
4
|
+
}
|
|
5
|
+
export declare const direct_result: <Result, Error>(result: Result) => _pi.Query_Result<Result, Error>;
|
|
6
|
+
export declare const direct_error: <T, E>($: E) => _pi.Query_Result<T, E>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.direct_error = exports.direct_result = exports.dictionaryx = void 0;
|
|
4
|
+
const query_result_1 = require("./query_result");
|
|
5
|
+
const asynchronous_collection_builder_1 = require("../__internals/async/asynchronous_collection_builder");
|
|
6
|
+
const create_asynchronous_processes_monitor_1 = require("../__internals/async/create_asynchronous_processes_monitor");
|
|
7
|
+
var dictionaryx;
|
|
8
|
+
(function (dictionaryx) {
|
|
9
|
+
dictionaryx.parallel = (dictionary, aggregate_errors) => {
|
|
10
|
+
return (0, query_result_1.__query_result)((on_success, on_error) => {
|
|
11
|
+
let has_errors = false;
|
|
12
|
+
const errors_builder = (0, asynchronous_collection_builder_1.create_asynchronous_dictionary_builder)();
|
|
13
|
+
const results_builder = (0, asynchronous_collection_builder_1.create_asynchronous_dictionary_builder)();
|
|
14
|
+
(0, create_asynchronous_processes_monitor_1.create_asynchronous_processes_monitor)((monitor) => {
|
|
15
|
+
dictionary.__d_map(($, key) => {
|
|
16
|
+
monitor['report process started']();
|
|
17
|
+
$.__extract_data(($) => {
|
|
18
|
+
results_builder['add entry'](key, $);
|
|
19
|
+
monitor['report process finished']();
|
|
20
|
+
}, ($) => {
|
|
21
|
+
has_errors = true;
|
|
22
|
+
errors_builder['add entry'](key, $);
|
|
23
|
+
monitor['report process finished']();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}, () => {
|
|
27
|
+
if (has_errors) {
|
|
28
|
+
on_error(aggregate_errors(errors_builder['get dictionary']()));
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
on_success(results_builder['get dictionary']());
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
})(dictionaryx || (exports.dictionaryx = dictionaryx = {}));
|
|
37
|
+
const direct_result = (result) => {
|
|
38
|
+
return (0, query_result_1.__query_result)((on_success, on_error) => {
|
|
39
|
+
on_success(result);
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
exports.direct_result = direct_result;
|
|
43
|
+
const direct_error = ($) => {
|
|
44
|
+
return (0, query_result_1.__query_result)((on_value, on_error) => {
|
|
45
|
+
on_error($);
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
exports.direct_error = direct_error;
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwcmVzc2lvbi5qcyIsInNvdXJjZV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iJ9
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../__internals/sync/expression/decide"), exports);
|
|
18
|
+
__exportStar(require("../__internals/sync/extracts/literal"), exports);
|
|
19
|
+
__exportStar(require("./expression"), exports);
|
|
20
|
+
__exportStar(require("./query_function"), exports);
|
|
21
|
+
__exportStar(require("./query_result"), exports);
|
|
22
|
+
__exportStar(require("./query"), exports);
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcXVlcnkvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHdFQUFxRDtBQUNyRCx1RUFBb0Q7QUFDcEQsK0NBQTRCO0FBQzVCLG1EQUFnQztBQUNoQyxpREFBOEI7QUFDOUIsMENBQXVCIn0=
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as _pi from "../interface";
|
|
2
|
+
type Queryer<Output, Error, Input> = ($: Input) => _pi.Query_Result<Output, Error>;
|
|
3
|
+
export declare const __query: <Result, Error, Parameters, Resources>(handler: Queryer<Result, Error, Parameters>) => _pi.Query<Result, Error, Parameters>;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__query = void 0;
|
|
4
|
+
const query_result_1 = require("./query_result");
|
|
5
|
+
const __query = (handler) => {
|
|
6
|
+
return (parameters, error_transformer) => {
|
|
7
|
+
return (0, query_result_1.__query_result)((on_success, on_error) => {
|
|
8
|
+
handler(parameters).__extract_data(on_success, (e) => {
|
|
9
|
+
on_error(error_transformer(e));
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
exports.__query = __query;
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcXVlcnkvcXVlcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsaURBQStDO0FBT3hDLE1BQU0sT0FBTyxHQUFHLENBQ25CLE9BQTJDLEVBQ1AsRUFBRTtJQUN0QyxPQUFPLENBQUMsVUFBVSxFQUFFLGlCQUFpQixFQUFFLEVBQUU7UUFDckMsT0FBTyxJQUFBLDZCQUFjLEVBQUMsQ0FBQyxVQUFVLEVBQUUsUUFBUSxFQUFFLEVBQUU7WUFDM0MsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDLGNBQWMsQ0FDOUIsVUFBVSxFQUNWLENBQUMsQ0FBQyxFQUFFLEVBQUU7Z0JBQ0YsUUFBUSxDQUFDLGlCQUFpQixDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUE7WUFDbEMsQ0FBQyxDQUNKLENBQUE7UUFDTCxDQUFDLENBQUMsQ0FBQTtJQUNOLENBQUMsQ0FBQTtBQUNMLENBQUMsQ0FBQTtBQWJZLFFBQUEsT0FBTyxXQWFuQiJ9
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as _pi from "../interface";
|
|
2
|
+
export declare const query_function: <Result, Error, Parameters, Query_Resources>(handler: ($p: Parameters, $q: Query_Resources) => _pi.Query_Result<Result, Error>) => _pi.Query_Function<_pi.Query<Result, Error, Parameters>, Query_Resources>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.query_function = void 0;
|
|
4
|
+
const query_result_1 = require("./query_result");
|
|
5
|
+
const query_function = (handler) => {
|
|
6
|
+
return ($q) => ($p, error_transformer) => {
|
|
7
|
+
return (0, query_result_1.__query_result)((on_success, on_error) => {
|
|
8
|
+
handler($p, $q).__extract_data(on_success, (e) => {
|
|
9
|
+
on_error(error_transformer(e));
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
exports.query_function = query_function;
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnlfZnVuY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcXVlcnkvcXVlcnlfZnVuY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBR0EsaURBQStDO0FBRXhDLE1BQU0sY0FBYyxHQUFHLENBQzFCLE9BR29DLEVBQ3FDLEVBQUU7SUFDM0UsT0FBTyxDQUFDLEVBQUUsRUFBRSxFQUFFLENBQUMsQ0FBQyxFQUFFLEVBQUUsaUJBQWlCLEVBQUUsRUFBRTtRQUNyQyxPQUFPLElBQUEsNkJBQWMsRUFBQyxDQUFDLFVBQVUsRUFBRSxRQUFRLEVBQUUsRUFBRTtZQUMzQyxPQUFPLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxDQUFDLGNBQWMsQ0FDMUIsVUFBVSxFQUNWLENBQUMsQ0FBQyxFQUFFLEVBQUU7Z0JBQ0YsUUFBUSxDQUFDLGlCQUFpQixDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUE7WUFDbEMsQ0FBQyxDQUNKLENBQUE7UUFDTCxDQUFDLENBQUMsQ0FBQTtJQUNOLENBQUMsQ0FBQTtBQUNMLENBQUMsQ0FBQTtBQWhCWSxRQUFBLGNBQWMsa0JBZ0IxQiJ9
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as _pi from "../interface";
|
|
2
|
+
/**
|
|
3
|
+
* this function contains the body in which the async value or error is executed
|
|
4
|
+
* after the execution, either the on_result or on_error callback will be called
|
|
5
|
+
* @param on_result the callback to call when a value is produced
|
|
6
|
+
* @param on_error the callback to call when an error is produced
|
|
7
|
+
*/
|
|
8
|
+
type Executer<Output, Error> = (on_result: ($: Output) => void, on_error: ($: Error) => void) => void;
|
|
9
|
+
export declare function __query_result<T, E>(executer: Executer<T, E>): _pi.Query_Result<T, E>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__query_result = __query_result;
|
|
4
|
+
const create_refinement_context_1 = require("../__internals/async/create_refinement_context");
|
|
5
|
+
class Query_Result_Class {
|
|
6
|
+
constructor(executer) {
|
|
7
|
+
this.executer = executer;
|
|
8
|
+
this.query_result = null;
|
|
9
|
+
}
|
|
10
|
+
transform_result(transformer) {
|
|
11
|
+
return new Query_Result_Class((on_result, on_error) => {
|
|
12
|
+
this.executer(($) => {
|
|
13
|
+
on_result(transformer($));
|
|
14
|
+
}, on_error);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
// deprecated_transform_error<New_Error>(
|
|
18
|
+
// error_transformer: _pi.Transformer<Error, New_Error>,
|
|
19
|
+
// ): _pi.Query_Result<Output, New_Error> {
|
|
20
|
+
// return new Query_Result_Class<Output, New_Error>((on_result, on_error) => {
|
|
21
|
+
// this.executer(
|
|
22
|
+
// on_result,
|
|
23
|
+
// ($) => {
|
|
24
|
+
// on_error(error_transformer($))
|
|
25
|
+
// },
|
|
26
|
+
// )
|
|
27
|
+
// })
|
|
28
|
+
// }
|
|
29
|
+
query_without_error_transformation(queryer) {
|
|
30
|
+
return new Query_Result_Class((on_result, on_error) => {
|
|
31
|
+
this.executer(($) => {
|
|
32
|
+
queryer($).__extract_data(on_result, on_error);
|
|
33
|
+
}, on_error);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
// query<New_Output, Query_Error>(
|
|
37
|
+
// queryer: Queryer<New_Output, Query_Error, Output>,
|
|
38
|
+
// error_transformer: _pi.Transformer<Query_Error, Error>,
|
|
39
|
+
// ): _pi.Query_Result<New_Output, Error> {
|
|
40
|
+
// return new Query_Result_Class<New_Output, Error>((on_result, on_error) => {
|
|
41
|
+
// this.executer(
|
|
42
|
+
// ($) => {
|
|
43
|
+
// queryer($).__extract_data(
|
|
44
|
+
// on_result,
|
|
45
|
+
// (queryer_error) => {
|
|
46
|
+
// on_error(error_transformer(queryer_error))
|
|
47
|
+
// },
|
|
48
|
+
// )
|
|
49
|
+
// },
|
|
50
|
+
// on_error,
|
|
51
|
+
// )
|
|
52
|
+
// })
|
|
53
|
+
// }
|
|
54
|
+
refine_without_error_transformation(callback) {
|
|
55
|
+
return new Query_Result_Class((on_result, on_error) => {
|
|
56
|
+
this.executer(($) => {
|
|
57
|
+
(0, create_refinement_context_1.create_refinement_context)((abort) => callback($, abort)).__extract_data(on_result, on_error);
|
|
58
|
+
}, on_error);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// refine<New_Output, Refiner_Error>(
|
|
62
|
+
// callback: ($: Output, abort: _pi.Abort<Refiner_Error>) => New_Output,
|
|
63
|
+
// error_transformer: _pi.Transformer<Refiner_Error, Error>,
|
|
64
|
+
// ): _pi.Query_Result<New_Output, Error> {
|
|
65
|
+
// return new Query_Result_Class<New_Output, Error>((on_result, on_error) => {
|
|
66
|
+
// this.executer(
|
|
67
|
+
// ($) => {
|
|
68
|
+
// _pinternals.deprecated_create_refinement_context<New_Output, Refiner_Error>((abort) => callback($, abort)).__extract_data(
|
|
69
|
+
// on_result,
|
|
70
|
+
// (stager_error) => {
|
|
71
|
+
// on_error(error_transformer(stager_error))
|
|
72
|
+
// },
|
|
73
|
+
// )
|
|
74
|
+
// },
|
|
75
|
+
// on_error,
|
|
76
|
+
// )
|
|
77
|
+
// })
|
|
78
|
+
// }
|
|
79
|
+
rework_error_temp(error_reworker, rework_error_transformer) {
|
|
80
|
+
return new Query_Result_Class((on_result, on_error) => {
|
|
81
|
+
this.executer(on_result, ($) => {
|
|
82
|
+
error_reworker($).__extract_data((new_target_error) => {
|
|
83
|
+
on_error(new_target_error);
|
|
84
|
+
}, (rework_error) => {
|
|
85
|
+
on_error(rework_error_transformer(rework_error));
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
__extract_data(on_result, on_error) {
|
|
91
|
+
this.executer(on_result, on_error);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function __query_result(executer) {
|
|
95
|
+
return new Query_Result_Class(executer);
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnlfcmVzdWx0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3F1ZXJ5L3F1ZXJ5X3Jlc3VsdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQTJKQSx3Q0FLQztBQS9KRCw4RkFBMEY7QUFpQjFGLE1BQU0sa0JBQWtCO0lBRXBCLFlBQVksUUFBaU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BQVMsRUFBRSxRQUFRLEVBQUUsRUFBRTtZQUNyRSxJQUFJLENBQUMsUUFBUSxDQUNULFNBQVMsRUFDVCxDQUFDLENBQUMsRUFBRSxFQUFFO2dCQUNGLGNBQWMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxjQUFjLENBQzVCLENBQUMsZ0JBQWdCLEVBQUUsRUFBRTtvQkFDakIsUUFBUSxDQUFDLGdCQUFnQixDQUFDLENBQUE7Z0JBQzlCLENBQUMsRUFDRCxDQUFDLFlBQVksRUFBRSxFQUFFO29CQUNiLFFBQVEsQ0FBQyx3QkFBd0IsQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFBO2dCQUNwRCxDQUFDLENBQ0osQ0FBQTtZQUNMLENBQUMsQ0FDSixDQUFBO1FBQ0wsQ0FBQyxDQUFDLENBQUE7SUFDTixDQUFDO0lBRUQsY0FBYyxDQUNWLFNBQThCLEVBQzlCLFFBQTRCO1FBRTVCLElBQUksQ0FBQyxRQUFRLENBQUMsU0FBUyxFQUFFLFFBQVEsQ0FBQyxDQUFBO0lBQ3RDLENBQUM7Q0FDSjtBQUdELFNBQWdCLGNBQWMsQ0FDMUIsUUFBd0I7SUFFeEIsT0FBTyxJQUFJLGtCQUFrQixDQUFPLFFBQVEsQ0FBQyxDQUFBO0FBRWpELENBQUMifQ==
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _pi from "../interface";
|
|
2
|
+
export * from "../__internals/sync/expression/decide";
|
|
3
|
+
export { deprecated_cc, deprecated_block, panic as fixme_abort, iterate, unreachable_code_path } from "../__internals/sync/expression/special";
|
|
4
|
+
export * from "../__internals/sync/expression/initialize";
|
|
5
|
+
type Dictionary_Builder<T> = {
|
|
6
|
+
'add entry': (key: string, value: T) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const deprecated_build_dictionary: <T>($: ($c: Dictionary_Builder<T>) => void, abort?: _pi.Abort<["duplicate key in dictionary literal", null]>) => _pi.Dictionary<T>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.deprecated_build_dictionary = exports.unreachable_code_path = exports.iterate = exports.fixme_abort = exports.deprecated_block = exports.deprecated_cc = void 0;
|
|
18
|
+
__exportStar(require("../__internals/sync/expression/decide"), exports);
|
|
19
|
+
var special_1 = require("../__internals/sync/expression/special");
|
|
20
|
+
Object.defineProperty(exports, "deprecated_cc", { enumerable: true, get: function () { return special_1.deprecated_cc; } });
|
|
21
|
+
Object.defineProperty(exports, "deprecated_block", { enumerable: true, get: function () { return special_1.deprecated_block; } });
|
|
22
|
+
Object.defineProperty(exports, "fixme_abort", { enumerable: true, get: function () { return special_1.panic; } });
|
|
23
|
+
Object.defineProperty(exports, "iterate", { enumerable: true, get: function () { return special_1.iterate; } });
|
|
24
|
+
Object.defineProperty(exports, "unreachable_code_path", { enumerable: true, get: function () { return special_1.unreachable_code_path; } });
|
|
25
|
+
__exportStar(require("../__internals/sync/expression/initialize"), exports);
|
|
26
|
+
const dictionary_1 = require("../__internals/sync/expression/literals/dictionary");
|
|
27
|
+
const deprecated_build_dictionary = ($, abort) => {
|
|
28
|
+
const temp = {};
|
|
29
|
+
$({
|
|
30
|
+
'add entry': (key, $) => {
|
|
31
|
+
if (key in temp) {
|
|
32
|
+
if (abort !== undefined) {
|
|
33
|
+
return abort(['duplicate key in dictionary literal', null]);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
throw new Error(`duplicate key in dictionary literal: ${key}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
temp[key] = $;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return (0, dictionary_1.$$)(temp);
|
|
43
|
+
};
|
|
44
|
+
exports.deprecated_build_dictionary = deprecated_build_dictionary;
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcmVmaW5lci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7OztBQUVBLHdFQUFxRDtBQUVyRCxrRUFNK0M7QUFMM0Msd0dBQUEsYUFBYSxPQUFBO0FBQ2IsMkdBQUEsZ0JBQWdCLE9BQUE7QUFDaEIsc0dBQUEsS0FBSyxPQUFlO0FBQ3BCLGtHQUFBLE9BQU8sT0FBQTtBQUNQLGdIQUFBLHFCQUFxQixPQUFBO0FBR3pCLDRFQUF5RDtBQVV6RCxtRkFBZ0c7QUFDekYsTUFBTSwyQkFBMkIsR0FBRyxDQUN2QyxDQUFzQyxFQUN0QyxLQUFnRSxFQUMvQyxFQUFFO0lBQ25CLE1BQU0sSUFBSSxHQUF5QixFQUFFLENBQUE7SUFDckMsQ0FBQyxDQUFDO1FBQ0UsV0FBVyxFQUFFLENBQUMsR0FBRyxFQUFFLENBQUMsRUFBRSxFQUFFO1lBQ3BCLElBQUksR0FBRyxJQUFJLElBQUksRUFBRSxDQUFDO2dCQUNkLElBQUksS0FBSyxLQUFLLFNBQVMsRUFBRSxDQUFDO29CQUN0QixPQUFPLEtBQUssQ0FBQyxDQUFDLHFDQUFxQyxFQUFFLElBQUksQ0FBQyxDQUFDLENBQUE7Z0JBQy9ELENBQUM7cUJBQU0sQ0FBQztvQkFDSixNQUFNLElBQUksS0FBSyxDQUFDLHdDQUF3QyxHQUFHLEVBQUUsQ0FBQyxDQUFBO2dCQUNsRSxDQUFDO1lBQ0wsQ0FBQztZQUNELElBQUksQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUE7UUFDakIsQ0FBQztLQUNKLENBQUMsQ0FBQTtJQUNGLE9BQU8sSUFBQSxlQUFxQixFQUFDLElBQUksQ0FBQyxDQUFBO0FBQ3RDLENBQUMsQ0FBQTtBQWxCWSxRQUFBLDJCQUEyQiwrQkFrQnZDIn0=
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import * as _pi from "../interface";
|
|
2
|
+
import * as initialize from "../__internals/sync/expression/initialize";
|
|
3
|
+
type Location_to_String<Source> = ($: Source) => string;
|
|
4
|
+
export type _T_Location_2_String<Source> = Location_to_String<Source>;
|
|
5
|
+
type Non_Circular_Result<T> = ['error', ['circular', _pi.List<string>]] | ['resolved', T];
|
|
6
|
+
type Lookup<T> = {
|
|
7
|
+
__get_possible_entry: (key: string) => _pi.Optional_Value<T>;
|
|
8
|
+
};
|
|
9
|
+
type Acyclic_Lookup<T> = _pi.Optional_Value<Lookup<Non_Circular_Result<T>>>;
|
|
10
|
+
export type _T_Acyclic_Lookup<T> = Acyclic_Lookup<T>;
|
|
11
|
+
type Possibly_Circular_Result<T> = _pi.Circular_Dependency<T>;
|
|
12
|
+
type Cyclic_Lookup<T> = _pi.Optional_Value<Lookup<Possibly_Circular_Result<T>>>;
|
|
13
|
+
export type _T_Cyclic_Lookup<T> = Cyclic_Lookup<T>;
|
|
14
|
+
type Lookup_Stack<T> = _pi.List<Acyclic_Lookup<T>>;
|
|
15
|
+
export type _T_Lookup_Stack<T> = Lookup_Stack<T>;
|
|
16
|
+
declare namespace unresolved$ {
|
|
17
|
+
type Derived_Reference<M_Source, T_Type> = null;
|
|
18
|
+
type Dictionary<M_Source, T_D> = {
|
|
19
|
+
readonly 'dictionary': _pi.Dictionary<{
|
|
20
|
+
readonly 'entry': T_D;
|
|
21
|
+
readonly 'location': M_Source;
|
|
22
|
+
}>;
|
|
23
|
+
readonly 'location': M_Source;
|
|
24
|
+
};
|
|
25
|
+
type List<M_Source, T_L> = {
|
|
26
|
+
readonly 'list': _pi.List<{
|
|
27
|
+
readonly 'element': T_L;
|
|
28
|
+
readonly 'location': M_Source;
|
|
29
|
+
}>;
|
|
30
|
+
readonly 'location': M_Source;
|
|
31
|
+
};
|
|
32
|
+
type Ordered_Dictionary<M_Source, T_D> = {
|
|
33
|
+
readonly 'dictionary': _pi.Dictionary<{
|
|
34
|
+
readonly 'entry': T_D;
|
|
35
|
+
readonly 'location': M_Source;
|
|
36
|
+
}>;
|
|
37
|
+
readonly 'location': M_Source;
|
|
38
|
+
};
|
|
39
|
+
type Reference_To_Circular_Dependent_Sibling<M_Source, T_Dictionary_Entry> = {
|
|
40
|
+
readonly 'key': string;
|
|
41
|
+
readonly 'location': M_Source;
|
|
42
|
+
};
|
|
43
|
+
type Reference_To_Normal_Dictionary_Entry<M_Source, T_Dictionary_Entry> = {
|
|
44
|
+
readonly 'key': string;
|
|
45
|
+
readonly 'location': M_Source;
|
|
46
|
+
};
|
|
47
|
+
type Reference_To_Stacked_Dictionary_Entry<M_Source, T_Dictionary_Entry> = {
|
|
48
|
+
readonly 'key': string;
|
|
49
|
+
readonly 'location': M_Source;
|
|
50
|
+
};
|
|
51
|
+
type State_Group<M_Source, T_SG> = {
|
|
52
|
+
readonly 'location': M_Source;
|
|
53
|
+
readonly 'state group': T_SG;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
declare namespace resolved$ {
|
|
57
|
+
type Derived_Reference<M_Source, T_Type> = T_Type;
|
|
58
|
+
type Dictionary<M_Source, T_D> = _pi.Dictionary<T_D>;
|
|
59
|
+
type List<M_Source, T_L> = _pi.List<T_L>;
|
|
60
|
+
type Ordered_Dictionary<M_Source, T_D> = {
|
|
61
|
+
readonly 'dictionary': _pi.Dictionary<T_D>;
|
|
62
|
+
readonly 'ordered list': _pi.List<{
|
|
63
|
+
readonly 'key': string;
|
|
64
|
+
readonly 'value': T_D;
|
|
65
|
+
}>;
|
|
66
|
+
};
|
|
67
|
+
type Reference_To_Circular_Dependent_Sibling<M_Source, T_Dictionary_Entry> = {
|
|
68
|
+
readonly 'entry': _pi.Circular_Dependency<T_Dictionary_Entry>;
|
|
69
|
+
readonly 'key': string;
|
|
70
|
+
};
|
|
71
|
+
type Reference_To_Normal_Dictionary_Entry<M_Source, T_Dictionary_Entry> = {
|
|
72
|
+
readonly 'entry': T_Dictionary_Entry;
|
|
73
|
+
readonly 'key': string;
|
|
74
|
+
};
|
|
75
|
+
type Reference_To_Stacked_Dictionary_Entry<M_Source, T_Dictionary_Entry> = {
|
|
76
|
+
readonly 'entry': T_Dictionary_Entry;
|
|
77
|
+
readonly 'key': string;
|
|
78
|
+
readonly 'up steps': number;
|
|
79
|
+
};
|
|
80
|
+
type State_Group<M_Source, T_SG> = T_SG;
|
|
81
|
+
}
|
|
82
|
+
export type Acyclic_Entry_Reference<T_Dictionary_Entry> = {
|
|
83
|
+
readonly 'entry': T_Dictionary_Entry;
|
|
84
|
+
readonly 'key': string;
|
|
85
|
+
};
|
|
86
|
+
type Key_Value_Location_Triplet<Source, T> = {
|
|
87
|
+
'key': string;
|
|
88
|
+
'value': T;
|
|
89
|
+
'location': Source;
|
|
90
|
+
};
|
|
91
|
+
export type Path<Source, Resolved_Element, Seed> = {
|
|
92
|
+
'list': _pi.List<Resolved_Element>;
|
|
93
|
+
'result': {
|
|
94
|
+
'data': Seed;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export type Resolved_Step<Resolved_Element, Seed> = {
|
|
98
|
+
'element': Resolved_Element;
|
|
99
|
+
'result': Seed;
|
|
100
|
+
};
|
|
101
|
+
type Resolve_Error_Type = [
|
|
102
|
+
'circular dependency',
|
|
103
|
+
{
|
|
104
|
+
'keys': _pi.List<string>;
|
|
105
|
+
}
|
|
106
|
+
] | [
|
|
107
|
+
'no such entry',
|
|
108
|
+
{
|
|
109
|
+
'key': string;
|
|
110
|
+
}
|
|
111
|
+
] | ['no context lookup', null] | [
|
|
112
|
+
'missing denseness entry',
|
|
113
|
+
{
|
|
114
|
+
'key': string;
|
|
115
|
+
}
|
|
116
|
+
] | [
|
|
117
|
+
'index out of bounds',
|
|
118
|
+
{
|
|
119
|
+
'up steps taken': number;
|
|
120
|
+
}
|
|
121
|
+
] | [
|
|
122
|
+
'no element found at index',
|
|
123
|
+
{
|
|
124
|
+
'index': number;
|
|
125
|
+
}
|
|
126
|
+
];
|
|
127
|
+
export declare const abort: <Source>(location: Source, type: Resolve_Error_Type, location_to_string: Location_to_String<Source>) => never;
|
|
128
|
+
export declare const dictionary_to_lookup: <T>($: _pi.Dictionary<T>, $p: null) => Acyclic_Lookup<T>;
|
|
129
|
+
export declare const get_possibly_circular_dependent_sibling_entry: <Source, T>($: Cyclic_Lookup<T>, $p: {
|
|
130
|
+
"reference": unresolved$.Reference_To_Circular_Dependent_Sibling<Source, T>;
|
|
131
|
+
"location 2 string": Location_to_String<Source>;
|
|
132
|
+
}) => resolved$.Reference_To_Circular_Dependent_Sibling<Source, T>;
|
|
133
|
+
export declare const push_stack: <T extends initialize.list.NonUndefined>($: _pi.List<T>, $p: {
|
|
134
|
+
"element": T;
|
|
135
|
+
}) => _pi.List<T>;
|
|
136
|
+
export declare const get_entry_from_stack: <Source, T>($: Lookup_Stack<T>, $p: {
|
|
137
|
+
"reference": unresolved$.Reference_To_Stacked_Dictionary_Entry<Source, T>;
|
|
138
|
+
"location 2 string": Location_to_String<Source>;
|
|
139
|
+
}) => resolved$.Reference_To_Stacked_Dictionary_Entry<Source, T>;
|
|
140
|
+
export declare const get_entry: <Source, T>($: Acyclic_Lookup<T>, $p: {
|
|
141
|
+
"reference": unresolved$.Reference_To_Normal_Dictionary_Entry<Source, T>;
|
|
142
|
+
"location 2 string": Location_to_String<Source>;
|
|
143
|
+
}) => resolved$.Reference_To_Normal_Dictionary_Entry<Source, T>;
|
|
144
|
+
export declare const resolve_path: <Source, Unresolved_Element, Resolved_Element extends initialize.list.NonUndefined, Seed>($: unresolved$.List<Source, Unresolved_Element>, $p: {
|
|
145
|
+
"seed": Seed;
|
|
146
|
+
"map": ($: Unresolved_Element, current: Seed) => Resolved_Step<Resolved_Element, Seed>;
|
|
147
|
+
}) => Path<Source, Resolved_Element, Seed>;
|
|
148
|
+
export declare const resolve_dictionary: <Source, TUnresolved, TResolved>($: unresolved$.Dictionary<Source, TUnresolved>, $p: {
|
|
149
|
+
"map": ($: Key_Value_Location_Triplet<Source, TUnresolved>, $l: {
|
|
150
|
+
"possibly circular dependent siblings": Cyclic_Lookup<TResolved>;
|
|
151
|
+
}) => TResolved;
|
|
152
|
+
"location 2 string": ($: Source) => string;
|
|
153
|
+
}) => resolved$.Dictionary<Source, TResolved>;
|
|
154
|
+
export declare const resolve_dense_dictionary: <Source, TUnresolved, TResolved, TBenchmark>($: unresolved$.Dictionary<Source, TUnresolved>, $p: {
|
|
155
|
+
"denseness benchmark": _pi.Dictionary<TBenchmark>;
|
|
156
|
+
"map": ($: Key_Value_Location_Triplet<Source, TUnresolved>, $l: {
|
|
157
|
+
"possibly circular dependent siblings": Cyclic_Lookup<TResolved>;
|
|
158
|
+
}) => TResolved;
|
|
159
|
+
"location 2 string": ($: Source) => string;
|
|
160
|
+
}) => resolved$.Dictionary<Source, TResolved>;
|
|
161
|
+
export declare const resolve_dense_ordered_dictionary: <Source, TUnresolved, TResolved, TBenchmark>($: unresolved$.Dictionary<Source, TUnresolved>, $p: {
|
|
162
|
+
"denseness benchmark": _pi.Dictionary<TBenchmark>;
|
|
163
|
+
"map": ($: Key_Value_Location_Triplet<Source, TUnresolved>, $l: {
|
|
164
|
+
"possibly circular dependent siblings": Cyclic_Lookup<TResolved>;
|
|
165
|
+
"not circular dependent siblings": Acyclic_Lookup<TResolved>;
|
|
166
|
+
}) => TResolved;
|
|
167
|
+
"location 2 string": ($: Source) => string;
|
|
168
|
+
}) => resolved$.Ordered_Dictionary<Source, TResolved>;
|
|
169
|
+
export declare const resolve_ordered_dictionary: <Source, TUnresolved, TResolved>($: unresolved$.Dictionary<Source, TUnresolved>, $p: {
|
|
170
|
+
"map": ($: Key_Value_Location_Triplet<Source, TUnresolved>, $l: {
|
|
171
|
+
"possibly circular dependent siblings": Cyclic_Lookup<TResolved>;
|
|
172
|
+
"not circular dependent siblings": Acyclic_Lookup<TResolved>;
|
|
173
|
+
}) => TResolved;
|
|
174
|
+
"location 2 string": ($: Source) => string;
|
|
175
|
+
}) => resolved$.Ordered_Dictionary<Source, TResolved>;
|
|
176
|
+
export {};
|