@nlozgachev/pipelined 0.63.0 → 0.64.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/README.md CHANGED
@@ -307,9 +307,9 @@ propagation, and timeout wiring are handled automatically. The outcome type is t
307
307
  ```ts
308
308
  const outcome = await fetchUser.run("42");
309
309
 
310
- if (Op.isOk(outcome)) {
310
+ if (Op.is.ok(outcome)) {
311
311
  render(outcome.value); // User
312
- } else if (Op.isErr(outcome)) {
312
+ } else if (Op.is.err(outcome)) {
313
313
  showError(outcome.error); // ApiError, not unknown
314
314
  }
315
315
 
@@ -343,10 +343,10 @@ const search = Op.interpret(searchOp, {
343
343
  });
344
344
 
345
345
  search.subscribe((state) => {
346
- if (Op.isPending(state)) showSpinner();
347
- if (Op.isRetrying(state)) showSpinner(`retrying… attempt ${state.attempt}`);
348
- if (Op.isOk(state)) showResults(state.value);
349
- if (Op.isErr(state)) showError(state.error);
346
+ if (Op.is.pending(state)) showSpinner();
347
+ if (Op.is.retrying(state)) showSpinner(`retrying… attempt ${state.attempt}`);
348
+ if (Op.is.ok(state)) showResults(state.value);
349
+ if (Op.is.err(state)) showError(state.error);
350
350
  });
351
351
 
352
352
  input.addEventListener("input", (e) => search.run(e.currentTarget.value));
@@ -368,9 +368,9 @@ const submit = Op.interpret(submitOp, {
368
368
  });
369
369
 
370
370
  submit.subscribe((state) => {
371
- submitButton.disabled = Op.isPending(state);
372
- if (Op.isOk(state)) showConfirmation(state.value);
373
- if (Op.isErr(state)) showError(state.error);
371
+ submitButton.disabled = Op.is.pending(state);
372
+ if (Op.is.ok(state)) showConfirmation(state.value);
373
+ if (Op.is.err(state)) showError(state.error);
374
374
  });
375
375
 
376
376
  form.addEventListener("submit", (e) => {