pareto-core 0.1.52 → 0.1.53
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.
|
@@ -2,3 +2,4 @@ import * as _pi from "../../interface";
|
|
|
2
2
|
export declare const entry: <T>(dictionary: _pi.Dictionary<T>, id: string, abort: {
|
|
3
3
|
no_such_entry: _pi.Abort<null>;
|
|
4
4
|
}) => T;
|
|
5
|
+
export declare const possible_entry: <T>(dictionary: _pi.Dictionary<T>, id: string) => _pi.Optional_Value<T>;
|
|
@@ -1,8 +1,52 @@
|
|
|
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.entry = void 0;
|
|
36
|
+
exports.possible_entry = exports.entry = void 0;
|
|
37
|
+
const _p = __importStar(require("./assign/literals/Optional"));
|
|
4
38
|
const entry = (dictionary, id, abort) => {
|
|
5
|
-
|
|
39
|
+
const entry = dictionary.__get_entry_raw(id);
|
|
40
|
+
return entry === null
|
|
41
|
+
? abort.no_such_entry(null)
|
|
42
|
+
: entry[0];
|
|
6
43
|
};
|
|
7
44
|
exports.entry = entry;
|
|
8
|
-
|
|
45
|
+
const possible_entry = (dictionary, id) => {
|
|
46
|
+
const entry = dictionary.__get_entry_raw(id);
|
|
47
|
+
return entry === null
|
|
48
|
+
? new _p.Not_Set_Optional_Value()
|
|
49
|
+
: new _p.Set_Optional_Value(entry[0]);
|
|
50
|
+
};
|
|
51
|
+
exports.possible_entry = possible_entry;
|
|
52
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL19faW50ZXJuYWxzL3N5bmMvc2VsZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNBLCtEQUFnRDtBQUV6QyxNQUFNLEtBQUssR0FBRyxDQUNqQixVQUE2QixFQUM3QixFQUFVLEVBQ1YsS0FFQyxFQUNBLEVBQUU7SUFDSCxNQUFNLEtBQUssR0FBRyxVQUFVLENBQUMsZU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