Skip to content

Commit

Permalink
fix(main): exactly one type
Browse files Browse the repository at this point in the history
exactly one type
  • Loading branch information
snomiao committed Jan 26, 2025
1 parent ba76e19 commit 0db0552
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import DIE from "phpdie";
import type { Ord } from "rambda";
import type { FieldPathByValue } from "react-hook-form";
import type { Split } from "ts-toolbelt/out/String/Split";
import { sf } from ".";
import sflow, { sf } from ".";

Check failure on line 5 in src/sflow.ts

View workflow job for this annotation

GitHub Actions / semantic-release

Individual declarations in merged declaration 'sflow' must be all exported or all local.

Check failure on line 5 in src/sflow.ts

View workflow job for this annotation

GitHub Actions / semantic-release

Import declaration conflicts with local declaration of 'sflow'.
import { asyncMaps } from "./asyncMaps";
import type { Awaitable } from "./Awaitable";
import { cacheLists } from "./cacheLists";
Expand Down Expand Up @@ -609,8 +609,8 @@ export const sflow = <T0, SRCS extends FlowSource<T0>[] = FlowSource<T0>[]>(
toLast: () => wseToPromise(sflow(r).tail(1)),
toExactlyOne: async () => {
const a = await wseToArray(r);
if (a.length > 1) DIE(`Expect only 1 Item, but got ${a.length}`);
return a[0];
a.length !== 1 || DIE(`Expect exactly 1 Item, but got ${a.length}`);
return a[0]!;
},
toOne: async () => {
const a = await wseToArray(r);
Expand Down Expand Up @@ -702,7 +702,7 @@ export function _byLazy<T, R>(
{
start: async (ctrl) => {
(async function () {
while (true) {
while (true) {
const { done, value } = await tr.read();
if (done) return ctrl.close();
ctrl.enqueue(value);
Expand Down

0 comments on commit 0db0552

Please sign in to comment.