@zimtsui/iterflow 0.0.8 → 0.0.10
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/README.md +3 -110
- package/build/evaluation.d.ts +15 -0
- package/build/evaluation.js +35 -0
- package/build/evaluation.js.map +1 -0
- package/build/exports.d.ts +3 -1
- package/build/exports.js +3 -1
- package/build/exports.js.map +1 -1
- package/build/opteva.d.ts +3 -72
- package/build/opteva.js +27 -291
- package/build/opteva.js.map +1 -1
- package/build/optimization.d.ts +30 -0
- package/build/optimization.js +99 -0
- package/build/optimization.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types.d.ts +23 -0
- package/build/types.js +40 -0
- package/build/types.js.map +1 -0
- package/package.json +7 -7
- package/build/exceptions.d.ts +0 -8
- package/build/exceptions.js +0 -13
- package/build/exceptions.js.map +0 -1
- package/build/test.d.ts +0 -1
- package/build/test.js +0 -281
- package/build/test.js.map +0 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Draft, Rejection, Opposition } from "./types.js";
|
|
2
|
+
export var Optimization;
|
|
3
|
+
(function (Optimization) {
|
|
4
|
+
/**
|
|
5
|
+
* @param optgen Ownership transferred.
|
|
6
|
+
*/
|
|
7
|
+
function from(optgen) {
|
|
8
|
+
return new Instance(optgen);
|
|
9
|
+
}
|
|
10
|
+
Optimization.from = from;
|
|
11
|
+
class Instance {
|
|
12
|
+
it;
|
|
13
|
+
/**
|
|
14
|
+
* @param optgen Ownership transferred.
|
|
15
|
+
*/
|
|
16
|
+
constructor(optgen) {
|
|
17
|
+
this.it = Instance.iterate(optgen);
|
|
18
|
+
}
|
|
19
|
+
async repeat() {
|
|
20
|
+
const output = await this.it.next().then(r => r.value);
|
|
21
|
+
if (output instanceof Draft) { }
|
|
22
|
+
else
|
|
23
|
+
throw new Error();
|
|
24
|
+
return output;
|
|
25
|
+
}
|
|
26
|
+
async reject(rejection) {
|
|
27
|
+
return await this.it.next(rejection).then(r => r.value);
|
|
28
|
+
}
|
|
29
|
+
async [Symbol.asyncDispose]() {
|
|
30
|
+
await this.it[Symbol.asyncDispose]?.();
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @param optgen Ownership transferred.
|
|
34
|
+
*/
|
|
35
|
+
static async *iterate(optgen) {
|
|
36
|
+
try {
|
|
37
|
+
let output = await optgen.next().then(r => r.value);
|
|
38
|
+
if (output instanceof Draft) { }
|
|
39
|
+
else
|
|
40
|
+
throw new Error();
|
|
41
|
+
let draft = output;
|
|
42
|
+
for (;;) {
|
|
43
|
+
const input = yield output;
|
|
44
|
+
if (input instanceof Rejection) {
|
|
45
|
+
output = await optgen.next(input).then(r => r.value);
|
|
46
|
+
if (output instanceof Draft)
|
|
47
|
+
draft = output;
|
|
48
|
+
}
|
|
49
|
+
else
|
|
50
|
+
output = draft;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
finally {
|
|
54
|
+
await optgen[Symbol.asyncDispose]?.();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
let View;
|
|
59
|
+
(function (View) {
|
|
60
|
+
function map(optview, f) {
|
|
61
|
+
async function* nextoptgen() {
|
|
62
|
+
let nextoutput = new Draft(await f(await optview.repeat().then(r => r.extract())));
|
|
63
|
+
for (;;) {
|
|
64
|
+
const rejection = yield nextoutput;
|
|
65
|
+
const output = await optview.reject(rejection);
|
|
66
|
+
if (output instanceof Draft)
|
|
67
|
+
nextoutput = new Draft(await f(output.extract()));
|
|
68
|
+
else if (output instanceof Opposition)
|
|
69
|
+
nextoutput = output;
|
|
70
|
+
else
|
|
71
|
+
throw new Error();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return Optimization.from(nextoptgen());
|
|
75
|
+
}
|
|
76
|
+
View.map = map;
|
|
77
|
+
})(View = Optimization.View || (Optimization.View = {}));
|
|
78
|
+
let Snapshot;
|
|
79
|
+
(function (Snapshot) {
|
|
80
|
+
function map(opt, f) {
|
|
81
|
+
async function* nextoptgen() {
|
|
82
|
+
let nextoutput = new Draft(await f(await opt.repeat().then(r => r.extract())));
|
|
83
|
+
for (;;) {
|
|
84
|
+
const rejection = yield nextoutput;
|
|
85
|
+
const output = await opt.reject(rejection);
|
|
86
|
+
if (output instanceof Draft)
|
|
87
|
+
throw rejection;
|
|
88
|
+
else if (output instanceof Opposition)
|
|
89
|
+
nextoutput = output;
|
|
90
|
+
else
|
|
91
|
+
throw new Error();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return Optimization.from(nextoptgen());
|
|
95
|
+
}
|
|
96
|
+
Snapshot.map = map;
|
|
97
|
+
})(Snapshot = Optimization.Snapshot || (Optimization.Snapshot = {}));
|
|
98
|
+
})(Optimization || (Optimization = {}));
|
|
99
|
+
//# sourceMappingURL=optimization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optimization.js","sourceRoot":"","sources":["../src/optimization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAS1D,MAAM,KAAW,YAAY,CAmI5B;AAnID,WAAiB,YAAY;IAUzB;;OAEG;IACH,SAAgB,IAAI,CAChB,MAA4D;QAE5D,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAJe,iBAAI,OAInB,CAAA;IAED,MAAM,QAAQ;QACA,EAAE,CAA4F;QAExG;;UAEE;QACF,YAAmB,MAA4D;YAC3E,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;QAEM,KAAK,CAAC,MAAM;YACf,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACvD,IAAI,MAAM,YAAY,KAAK,EAAE,C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S,GAAyB,MAAM,UAAU,CAAC;oBACzD,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;oBAC3C,IAAI,MAAM,YAAY,KAAK;wBACvB,MAAM,SAAS,CAAC;yBACf,IAAI,MAAM,YAAY,UAAU;wBACjC,UAAU,GAAG,MAAM,CAAC;;wBACnB,MAAM,IAAI,KAAK,EAAE,CAAC;gBAC3B,CAAC;YACL,CAAC;YACD,OAAO,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,CAA4D,CAAC;QACtG,CAAC;QApBe,YAAG,MAoBlB,CAAA;IACL,CAAC,EAvBgB,QAAQ,GAAR,qBAAQ,KAAR,qBAAQ,QAuBxB;AACL,CAAC,EAnIgB,YAAY,KAAZ,YAAY,QAmI5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../../../../usr/lib/node_modules/typescript/lib/lib.es5.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2018.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2019.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2020.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2021.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2022.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2023.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2024.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.esnext.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.esnext.array.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.esnext.error.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.decorators.d.ts","../../../../../usr/lib/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/exceptions.ts","../src/opteva.ts","../src/exports.ts","../node_modules/ava/types/assertions.d.cts","../node_modules/ava/types/subscribable.d.cts","../node_modules/ava/types/try-fn.d.cts","../node_modules/ava/types/test-fn.d.cts","../node_modules/ava/entrypoints/main.d.mts","../src/test.ts","../node_modules/@types/estree/index.d.ts"],"fileIdsList":[[84,85,86,87],[84,85,86],[87],[81,82],[81],[83,88]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"2ab096661c711e4a81cc464fa1e6feb929a54f5340b46b0a07ac6bbf857471f0","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"196cb558a13d4533a5163286f30b0509ce0210e4b316c56c38d4c0fd2fb38405","affectsGlobalScope":true,"impliedFormat":1},{"version":"73f78680d4c08509933daf80947902f6ff41b6230f94dd002ae372620adb0f60","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5239f5c01bcfa9cd32f37c496cf19c61d69d37e48be9de612b541aac915805b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"21524e01f352b6f9d3e835d9ee01f14888746464959bbf18d35fdcf4075b0652","signature":"17432b7db89c1f48cf82c7ecf1ae9750aa7d4fe1d0ab02a1ee66fd731cf11d40"},{"version":"9a3e600fa37920bd071d819113ec1232b3d0c27e76cd818c22be9bb75beab05f","signature":"2beebd3829ea4902e758e5eda3ce7681e4b8f4327e8a5432211ec49017ec36ed"},"ff70d9bb166642a653426b9e6327550cee5813121372e8cbbf6e9d299b100df1",{"version":"d8750101c0f4631f1632897699ef075c5fc684df5eeee3832c993c948b334dbe","impliedFormat":1},{"version":"00b72e597dcd6ff7bf772918c78c41dc7c68e239af658cf452bff645ebdc485d","impliedFormat":1},{"version":"17b183b69a3dd3cca2505cee7ff70501c574343ad49a385c9acb5b5299e1ba73","impliedFormat":1},{"version":"65971ae48adee73c3f604209b64a4e34e319d7ce25c2ea452cc15b05a2b43db5","impliedFormat":1},{"version":"de8391b91c499acbc09df8d9ba114dc8c44456d54e81ed01211c32a1d6ad94fb","impliedFormat":99},{"version":"fa0825aaad64c246abccb0e5b0f92a6fe1c26df824b34042ae077972cf8fbeac","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1}],"root":[[81,83],89],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"experimentalDecorators":true,"module":200,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"noUncheckedSideEffectImports":true,"outDir":"./","rewriteRelativeImportExtensions":true,"skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"verbatimModuleSyntax":true},"referencedMap":[[88,1],[87,2],[86,3],[83,4],[82,5],[89,6]],"latestChangedDtsFile":"./test.d.ts","version":"5.9.3"}
|
|
1
|
+
{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.es2023.d.ts","../node_modules/typescript/lib/lib.es2024.d.ts","../node_modules/typescript/lib/lib.es2025.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/typescript/lib/lib.es2023.array.d.ts","../node_modules/typescript/lib/lib.es2023.collection.d.ts","../node_modules/typescript/lib/lib.es2023.intl.d.ts","../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2024.collection.d.ts","../node_modules/typescript/lib/lib.es2024.object.d.ts","../node_modules/typescript/lib/lib.es2024.promise.d.ts","../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2024.string.d.ts","../node_modules/typescript/lib/lib.es2025.collection.d.ts","../node_modules/typescript/lib/lib.es2025.float16.d.ts","../node_modules/typescript/lib/lib.es2025.intl.d.ts","../node_modules/typescript/lib/lib.es2025.iterator.d.ts","../node_modules/typescript/lib/lib.es2025.promise.d.ts","../node_modules/typescript/lib/lib.es2025.regexp.d.ts","../node_modules/typescript/lib/lib.esnext.array.d.ts","../node_modules/typescript/lib/lib.esnext.collection.d.ts","../node_modules/typescript/lib/lib.esnext.date.d.ts","../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../node_modules/typescript/lib/lib.esnext.error.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../node_modules/typescript/lib/lib.esnext.temporal.d.ts","../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/types.ts","../src/evaluation.ts","../src/optimization.ts","../src/opteva.ts","../src/exports.ts"],"fileIdsList":[[88],[88,89,90,91],[88,89,90]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"999ca32883495a866aa5737fe1babc764a469e4cde6ee6b136a4b9ae68853e4b","impliedFormat":1},{"version":"17f13ecb98cbc39243f2eee1f16d45cd8ec4706b03ee314f1915f1a8b42f6984","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"30d62269b05b584741f19a5369852d5d34895aa2ac4fd948956f886d15f9cc0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"996fb27b15277369c68a4ba46ed138b4e9e839a02fb4ec756f7997629242fd9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9","affectsGlobalScope":true,"impliedFormat":1},{"version":"20884846cef428b992b9bd032e70a4ef88e349263f63aeddf04dda837a7dba26","affectsGlobalScope":true,"impliedFormat":1},{"version":"5fcab789c73a97cd43828ee3cc94a61264cf24d4c44472ce64ced0e0f148bdb2","affectsGlobalScope":true,"impliedFormat":1},{"version":"db59a81f070c1880ad645b2c0275022baa6a0c4f0acdc58d29d349c6efcf0903","affectsGlobalScope":true,"impliedFormat":1},{"version":"673294292640f5722b700e7d814e17aaf7d93f83a48a2c9b38f33cbc940ad8b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d786b48f934cbca483b3c6d0a798cb43bbb4ada283e76fb22c28e53ae05b9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"142efd4ce210576f777dc34df121777be89eda476942d6d6663b03dcb53be3ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"379bc41580c2d774f82e828c70308f24a005b490c25ba34d679d84bcf05c3d9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed484fb2aa8a1a23d0277056ec3336e0a0b52f9b8d6a961f338a642faf43235d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"83a730b125d477dd264df8ba479afab27a3dae7152b005c214ab94dc7ee44fd3","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"faf3f95be4af1dd172d12de5a9ac37e9e743e0742924e0683910f4e2d46b0634","signature":"efa87fe22a45152cc7e335c9457e895f08d9b096a6066cf99637fabf728cda98"},{"version":"ae1937453ec5760bc54eab75ad6260a0866d6bc85656e97df272ea7571ea019a","signature":"15c5e68bb7294fdbdad50dbe16539bdadf05b61d9f4ee15dc058f74ffeb7529a"},{"version":"25c7513ec07212331a4a7b96220f64477dcf20477eefef2f060318edd77ce4ec","signature":"4b78ca9321ca882de88c0bee9a5afcb67200a874dee97a5a1898866a13a9dccc"},{"version":"512e2debcb5ccaeec4cf7cd0cf75d89a3796c1f9d416052017a1a44bf5b6ae89","signature":"91f6777c90db8a526c50ec14e5220cb75419dc7eb79e3ba7fbaa9197cb6d469e"},"668bc06561b0103571f441a6426baad3a237ea99a670779774ee4796cd1b5408"],"root":[[88,92]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"checkJs":true,"composite":true,"experimentalDecorators":true,"module":200,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rewriteRelativeImportExtensions":true,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"target":9},"referencedMap":[[89,1],[92,2],[91,3],[90,1]],"latestChangedDtsFile":"./exports.d.ts","version":"6.0.2"}
|
package/build/types.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const NOMINAL: unique symbol;
|
|
2
|
+
export declare class Draft<T> {
|
|
3
|
+
protected value: T;
|
|
4
|
+
protected [NOMINAL]: never;
|
|
5
|
+
constructor(value: T);
|
|
6
|
+
[Symbol.toPrimitive](): never;
|
|
7
|
+
extract(): T;
|
|
8
|
+
}
|
|
9
|
+
export declare class Rejection<T> extends Error {
|
|
10
|
+
cause: T;
|
|
11
|
+
protected [NOMINAL]: never;
|
|
12
|
+
constructor(cause: T);
|
|
13
|
+
[Symbol.toPrimitive](): never;
|
|
14
|
+
extract(): T;
|
|
15
|
+
}
|
|
16
|
+
export declare class Opposition<T> extends Error {
|
|
17
|
+
cause: T;
|
|
18
|
+
protected [NOMINAL]: never;
|
|
19
|
+
constructor(cause: T);
|
|
20
|
+
[Symbol.toPrimitive](): never;
|
|
21
|
+
extract(): T;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
package/build/types.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const NOMINAL = Symbol();
|
|
2
|
+
export class Draft {
|
|
3
|
+
value;
|
|
4
|
+
constructor(value) {
|
|
5
|
+
this.value = value;
|
|
6
|
+
}
|
|
7
|
+
[Symbol.toPrimitive]() {
|
|
8
|
+
throw new Error();
|
|
9
|
+
}
|
|
10
|
+
extract() {
|
|
11
|
+
return this.value;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class Rejection extends Error {
|
|
15
|
+
cause;
|
|
16
|
+
constructor(cause) {
|
|
17
|
+
super();
|
|
18
|
+
this.cause = cause;
|
|
19
|
+
}
|
|
20
|
+
[Symbol.toPrimitive]() {
|
|
21
|
+
throw new Error();
|
|
22
|
+
}
|
|
23
|
+
extract() {
|
|
24
|
+
return this.cause;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export class Opposition extends Error {
|
|
28
|
+
cause;
|
|
29
|
+
constructor(cause) {
|
|
30
|
+
super();
|
|
31
|
+
this.cause = cause;
|
|
32
|
+
}
|
|
33
|
+
[Symbol.toPrimitive]() {
|
|
34
|
+
throw new Error();
|
|
35
|
+
}
|
|
36
|
+
extract() {
|
|
37
|
+
return this.cause;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC;AAEzB,MAAM,OAAO,KAAK;IAEe;IAA7B,YAA6B,KAAQ;QAAR,UAAK,GAAL,KAAK,CAAG;IAAG,CAAC;IAClC,CAAC,MAAM,CAAC,WAAW,CAAC;QACvB,MAAM,IAAI,KAAK,EAAE,CAAC;IACtB,CAAC;IACM,OAAO;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;CACJ;AAED,MAAM,OAAO,SAAa,SAAQ,KAAK;IAEA;IAAnC,YAAmC,KAAQ;QACvC,KAAK,EAAE,CAAC;QADuB,UAAK,GAAL,KAAK,CAAG;IAE3C,CAAC;IACM,CAAC,MAAM,CAAC,WAAW,CAAC;QACvB,MAAM,IAAI,KAAK,EAAE,CAAC;IACtB,CAAC;IACM,OAAO;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;CACJ;AAED,MAAM,OAAO,UAAc,SAAQ,KAAK;IAED;IAAnC,YAAmC,KAAQ;QACvC,KAAK,EAAE,CAAC;QADuB,UAAK,GAAL,KAAK,CAAG;IAE3C,CAAC;IACM,CAAC,MAAM,CAAC,WAAW,CAAC;QACvB,MAAM,IAAI,KAAK,EAAE,CAAC;IACtB,CAAC;IACM,OAAO;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/zimtsui/iterflow.git"
|
|
8
8
|
},
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=22"
|
|
11
|
+
},
|
|
9
12
|
"scripts": {
|
|
13
|
+
"test": "npm run build && ava ./test/test.ts",
|
|
10
14
|
"build": "tsc -b ./src/tsconfig.json",
|
|
11
15
|
"clean": "rm -rf ./build",
|
|
12
|
-
"test": "ava ./build/test.js",
|
|
13
16
|
"prepublishOnly": "npm run clean && npm run build"
|
|
14
17
|
},
|
|
15
18
|
"author": "Zim",
|
|
16
|
-
"license": "MIT",
|
|
17
|
-
"peerDependencies": {
|
|
18
|
-
"@opentelemetry/api": "^1.9.0"
|
|
19
|
-
},
|
|
20
19
|
"devDependencies": {
|
|
21
20
|
"ava": "^7.0.0",
|
|
22
|
-
"openai": "^6.29.0"
|
|
21
|
+
"openai": "^6.29.0",
|
|
22
|
+
"typescript": "^6.0.2"
|
|
23
23
|
},
|
|
24
|
-
"version": "0.0.
|
|
24
|
+
"version": "0.0.10"
|
|
25
25
|
}
|
package/build/exceptions.d.ts
DELETED
package/build/exceptions.js
DELETED
package/build/exceptions.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../src/exceptions.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,UAAU;IACO;IAA1B,YAA0B,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IAAG,CAAC;CAChD;AACD,MAAM,OAAO,SAAS;IACQ;IAA1B,YAA0B,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IAAG,CAAC;CAChD"}
|
package/build/test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/build/test.js
DELETED
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
-
if (value !== null && value !== void 0) {
|
|
3
|
-
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
-
var dispose, inner;
|
|
5
|
-
if (async) {
|
|
6
|
-
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
-
dispose = value[Symbol.asyncDispose];
|
|
8
|
-
}
|
|
9
|
-
if (dispose === void 0) {
|
|
10
|
-
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
-
dispose = value[Symbol.dispose];
|
|
12
|
-
if (async) inner = dispose;
|
|
13
|
-
}
|
|
14
|
-
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
-
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
-
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
-
}
|
|
18
|
-
else if (async) {
|
|
19
|
-
env.stack.push({ async: true });
|
|
20
|
-
}
|
|
21
|
-
return value;
|
|
22
|
-
};
|
|
23
|
-
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
-
return function (env) {
|
|
25
|
-
function fail(e) {
|
|
26
|
-
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
-
env.hasError = true;
|
|
28
|
-
}
|
|
29
|
-
var r, s = 0;
|
|
30
|
-
function next() {
|
|
31
|
-
while (r = env.stack.pop()) {
|
|
32
|
-
try {
|
|
33
|
-
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
-
if (r.dispose) {
|
|
35
|
-
var result = r.dispose.call(r.value);
|
|
36
|
-
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
-
}
|
|
38
|
-
else s |= 1;
|
|
39
|
-
}
|
|
40
|
-
catch (e) {
|
|
41
|
-
fail(e);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
-
if (env.hasError) throw env.error;
|
|
46
|
-
}
|
|
47
|
-
return next();
|
|
48
|
-
};
|
|
49
|
-
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
-
var e = new Error(message);
|
|
51
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
-
});
|
|
53
|
-
import test from 'ava';
|
|
54
|
-
import { Evaluation, Optimization, Opposition, Rejection, opteva, } from "./exports.js";
|
|
55
|
-
test('Evaluation.Initialized.from rejects evaluators that miss the sentinel first yield', async (t) => {
|
|
56
|
-
async function* raw() {
|
|
57
|
-
yield 'not-a-sentinel';
|
|
58
|
-
throw new Error('unreachable');
|
|
59
|
-
}
|
|
60
|
-
const error = await t.throwsAsync(async () => {
|
|
61
|
-
await Evaluation.Initialized.from(raw());
|
|
62
|
-
});
|
|
63
|
-
t.true(error instanceof Error);
|
|
64
|
-
if (error instanceof Error)
|
|
65
|
-
t.is(error.cause, 'not-a-sentinel');
|
|
66
|
-
});
|
|
67
|
-
test('Optimization.Cache.from replays the latest accepted draft and preserves it after opposition', async (t) => {
|
|
68
|
-
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
69
|
-
try {
|
|
70
|
-
const seenRejections = [];
|
|
71
|
-
async function* raw() {
|
|
72
|
-
let draft = 'draft-1';
|
|
73
|
-
for (;;)
|
|
74
|
-
try {
|
|
75
|
-
yield draft;
|
|
76
|
-
}
|
|
77
|
-
catch (e) {
|
|
78
|
-
if (!(e instanceof Rejection))
|
|
79
|
-
throw e;
|
|
80
|
-
seenRejections.push(e.message);
|
|
81
|
-
if (e.message === 'revise')
|
|
82
|
-
draft = 'draft-2';
|
|
83
|
-
else if (e.message === 'wrong')
|
|
84
|
-
yield new Opposition('keep draft-2');
|
|
85
|
-
else
|
|
86
|
-
throw e;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
const cache = __addDisposableResource(env_1, Optimization.Cache.from(raw()), true);
|
|
90
|
-
t.is(await cache.next().then(r => r.value), 'draft-1');
|
|
91
|
-
t.is(await cache.next().then(r => r.value), 'draft-1');
|
|
92
|
-
t.is(await cache.throw(new Rejection('revise')).then(r => r.value), 'draft-2');
|
|
93
|
-
t.is(await cache.next().then(r => r.value), 'draft-2');
|
|
94
|
-
const opposition = await cache.throw(new Rejection('wrong')).then(r => r.value);
|
|
95
|
-
t.true(opposition instanceof Opposition);
|
|
96
|
-
if (opposition instanceof Opposition)
|
|
97
|
-
t.is(opposition.message, 'keep draft-2');
|
|
98
|
-
t.is(await cache.next().then(r => r.value), 'draft-2');
|
|
99
|
-
t.deepEqual(seenRejections, ['revise', 'wrong']);
|
|
100
|
-
}
|
|
101
|
-
catch (e_1) {
|
|
102
|
-
env_1.error = e_1;
|
|
103
|
-
env_1.hasError = true;
|
|
104
|
-
}
|
|
105
|
-
finally {
|
|
106
|
-
const result_1 = __disposeResources(env_1);
|
|
107
|
-
if (result_1)
|
|
108
|
-
await result_1;
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
test('Optimization.Snapshot.from rethrows revisions and only returns oppositions', async (t) => {
|
|
112
|
-
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
113
|
-
try {
|
|
114
|
-
async function* raw() {
|
|
115
|
-
let draft = 'draft-1';
|
|
116
|
-
for (;;)
|
|
117
|
-
try {
|
|
118
|
-
yield draft;
|
|
119
|
-
}
|
|
120
|
-
catch (e) {
|
|
121
|
-
if (!(e instanceof Rejection))
|
|
122
|
-
throw e;
|
|
123
|
-
if (e.message === 'revise')
|
|
124
|
-
draft = 'draft-2';
|
|
125
|
-
else if (e.message === 'wrong')
|
|
126
|
-
yield new Opposition('keep draft-2');
|
|
127
|
-
else
|
|
128
|
-
throw e;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
const cache = __addDisposableResource(env_2, Optimization.Cache.from(raw()), true);
|
|
132
|
-
const snapshot = Optimization.Snapshot.from(cache);
|
|
133
|
-
t.is(await snapshot.next().then(r => r.value), 'draft-1');
|
|
134
|
-
const revision = new Rejection('revise');
|
|
135
|
-
let thrown;
|
|
136
|
-
try {
|
|
137
|
-
await snapshot.throw(revision);
|
|
138
|
-
}
|
|
139
|
-
catch (e) {
|
|
140
|
-
thrown = e;
|
|
141
|
-
}
|
|
142
|
-
t.is(thrown, revision);
|
|
143
|
-
t.is(await snapshot.next().then(r => r.value), 'draft-2');
|
|
144
|
-
const opposition = await snapshot.throw(new Rejection('wrong')).then(r => r.value);
|
|
145
|
-
t.true(opposition instanceof Opposition);
|
|
146
|
-
if (opposition instanceof Opposition)
|
|
147
|
-
t.is(opposition.message, 'keep draft-2');
|
|
148
|
-
}
|
|
149
|
-
catch (e_2) {
|
|
150
|
-
env_2.error = e_2;
|
|
151
|
-
env_2.hasError = true;
|
|
152
|
-
}
|
|
153
|
-
finally {
|
|
154
|
-
const result_2 = __disposeResources(env_2);
|
|
155
|
-
if (result_2)
|
|
156
|
-
await result_2;
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
test('opteva returns a recovered snapshot when the evaluator accepts immediately', async (t) => {
|
|
160
|
-
const env_3 = { stack: [], error: void 0, hasError: false };
|
|
161
|
-
try {
|
|
162
|
-
async function* optimize() {
|
|
163
|
-
yield 'draft';
|
|
164
|
-
throw new Error('unreachable');
|
|
165
|
-
}
|
|
166
|
-
async function* evaluate() {
|
|
167
|
-
const draft = yield new Evaluation.FirstYield();
|
|
168
|
-
yield draft.length;
|
|
169
|
-
throw new Error('unreachable');
|
|
170
|
-
}
|
|
171
|
-
const optimization = __addDisposableResource(env_3, Optimization.Cache.from(optimize()), true);
|
|
172
|
-
const evaluation = __addDisposableResource(env_3, await Evaluation.Initialized.from(evaluate()), true);
|
|
173
|
-
const snapshot = await opteva(Optimization.Snapshot.from(optimization), evaluation);
|
|
174
|
-
t.is(await snapshot.next().then(r => r.value), 5);
|
|
175
|
-
t.is(await snapshot.next().then(r => r.value), 5);
|
|
176
|
-
}
|
|
177
|
-
catch (e_3) {
|
|
178
|
-
env_3.error = e_3;
|
|
179
|
-
env_3.hasError = true;
|
|
180
|
-
}
|
|
181
|
-
finally {
|
|
182
|
-
const result_3 = __disposeResources(env_3);
|
|
183
|
-
if (result_3)
|
|
184
|
-
await result_3;
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
test('opteva surfaces a rejection after optimizer revision and succeeds on the next attempt', async (t) => {
|
|
188
|
-
const env_4 = { stack: [], error: void 0, hasError: false };
|
|
189
|
-
try {
|
|
190
|
-
async function* optimize() {
|
|
191
|
-
let draft = 'draft-1';
|
|
192
|
-
for (;;)
|
|
193
|
-
try {
|
|
194
|
-
yield draft;
|
|
195
|
-
}
|
|
196
|
-
catch (e) {
|
|
197
|
-
if (!(e instanceof Rejection))
|
|
198
|
-
throw e;
|
|
199
|
-
if (e.message === 'too short')
|
|
200
|
-
draft = 'draft-2';
|
|
201
|
-
else
|
|
202
|
-
throw e;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
async function* evaluate() {
|
|
206
|
-
let draft = yield new Evaluation.FirstYield();
|
|
207
|
-
draft = yield new Rejection('too short');
|
|
208
|
-
yield draft.toUpperCase();
|
|
209
|
-
throw new Error('unreachable');
|
|
210
|
-
}
|
|
211
|
-
const optimization = __addDisposableResource(env_4, Optimization.Cache.from(optimize()), true);
|
|
212
|
-
const evaluation = __addDisposableResource(env_4, await Evaluation.Initialized.from(evaluate()), true);
|
|
213
|
-
let rejection;
|
|
214
|
-
try {
|
|
215
|
-
await opteva(Optimization.Snapshot.from(optimization), evaluation);
|
|
216
|
-
}
|
|
217
|
-
catch (e) {
|
|
218
|
-
rejection = e;
|
|
219
|
-
}
|
|
220
|
-
t.true(rejection instanceof Rejection);
|
|
221
|
-
if (rejection instanceof Rejection)
|
|
222
|
-
t.is(rejection.message, 'too short');
|
|
223
|
-
const snapshot = await opteva(Optimization.Snapshot.from(optimization), evaluation);
|
|
224
|
-
t.is(await snapshot.next().then(r => r.value), 'DRAFT-2');
|
|
225
|
-
}
|
|
226
|
-
catch (e_4) {
|
|
227
|
-
env_4.error = e_4;
|
|
228
|
-
env_4.hasError = true;
|
|
229
|
-
}
|
|
230
|
-
finally {
|
|
231
|
-
const result_4 = __disposeResources(env_4);
|
|
232
|
-
if (result_4)
|
|
233
|
-
await result_4;
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
test('opteva resolves optimizer opposition through evaluator.throw without restarting', async (t) => {
|
|
237
|
-
const env_5 = { stack: [], error: void 0, hasError: false };
|
|
238
|
-
try {
|
|
239
|
-
async function* optimize() {
|
|
240
|
-
for (;;)
|
|
241
|
-
try {
|
|
242
|
-
yield 'candidate';
|
|
243
|
-
}
|
|
244
|
-
catch (e) {
|
|
245
|
-
if (!(e instanceof Rejection))
|
|
246
|
-
throw e;
|
|
247
|
-
if (e.message === 'wrong')
|
|
248
|
-
yield new Opposition('candidate is valid');
|
|
249
|
-
else
|
|
250
|
-
throw e;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
async function* evaluate() {
|
|
254
|
-
const draft = yield new Evaluation.FirstYield();
|
|
255
|
-
try {
|
|
256
|
-
yield new Rejection('wrong');
|
|
257
|
-
}
|
|
258
|
-
catch (e) {
|
|
259
|
-
if (!(e instanceof Opposition))
|
|
260
|
-
throw e;
|
|
261
|
-
yield `${draft}:${e.message}`;
|
|
262
|
-
throw new Error('unreachable');
|
|
263
|
-
}
|
|
264
|
-
throw new Error('unreachable');
|
|
265
|
-
}
|
|
266
|
-
const optimization = __addDisposableResource(env_5, Optimization.Cache.from(optimize()), true);
|
|
267
|
-
const evaluation = __addDisposableResource(env_5, await Evaluation.Initialized.from(evaluate()), true);
|
|
268
|
-
const snapshot = await opteva(Optimization.Snapshot.from(optimization), evaluation);
|
|
269
|
-
t.is(await snapshot.next().then(r => r.value), 'candidate:candidate is valid');
|
|
270
|
-
}
|
|
271
|
-
catch (e_5) {
|
|
272
|
-
env_5.error = e_5;
|
|
273
|
-
env_5.hasError = true;
|
|
274
|
-
}
|
|
275
|
-
finally {
|
|
276
|
-
const result_5 = __disposeResources(env_5);
|
|
277
|
-
if (result_5)
|
|
278
|
-
await result_5;
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
//# sourceMappingURL=test.js.map
|
package/build/test.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;;;;;;;;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