Fix StartOS 0.4 TypeScript packaging to match SDK API
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.changeOnFirstSuccess = changeOnFirstSuccess;
|
||||
function changeOnFirstSuccess(o) {
|
||||
return async function* (getInput) {
|
||||
let currentValue = getInput();
|
||||
while (!currentValue.lastResult) {
|
||||
yield;
|
||||
currentValue = getInput();
|
||||
}
|
||||
const beforeFirstSuccess = o.beforeFirstSuccess(getInput);
|
||||
for (let res = await beforeFirstSuccess.next(); currentValue?.lastResult !== 'success' && !res.done; res = await beforeFirstSuccess.next()) {
|
||||
yield;
|
||||
currentValue = getInput();
|
||||
}
|
||||
const afterFirstSuccess = o.afterFirstSuccess(getInput);
|
||||
for (let res = await afterFirstSuccess.next(); !res.done; res = await afterFirstSuccess.next()) {
|
||||
yield;
|
||||
currentValue = getInput();
|
||||
}
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=changeOnFirstSuccess.js.map
|
||||
Reference in New Issue
Block a user