Skip to content

Commit 4614233

Browse files
Nick Ficanoclaude
andcommitted
fix(client-effect): lint auto-fixes from slice #46
ESLint --fix output on packages/client/src/client-effect.ts and the companion test file: drop redundant type assertion + default-value type arguments; reorder imports to match import/order rule; replace Array.from(collected) with spread. Pure mechanical fixups; no behavior change. Tests still green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent de389ab commit 4614233

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/client/src/client-effect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ export function subscribeEnvelopes(
304304
Effect.gen(function* () {
305305
const { client } = yield* ARCPClientService;
306306
if (client === null) {
307-
return Stream.empty as Stream.Stream<Envelope, never>;
307+
return Stream.empty;
308308
}
309309
const byType = emitterRegistry(client);
310310
const emitters = installFanoutHandler(client, type, byType);

packages/client/test/client-effect.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ import {
2424
import { Effect, Stream } from "effect";
2525
import { describe, expect, it } from "vitest";
2626

27-
import { ARCPClient } from "../src/client.js";
2827
import {
2928
ARCPClientLayer,
3029
ARCPClientService,
3130
makeARCPClientRuntime,
3231
subscribeEnvelopes,
3332
} from "../src/client-effect.js";
33+
import { ARCPClient } from "../src/client.js";
3434
import type { ARCPClientOptions } from "../src/types.js";
3535

3636
const TEST_CLIENT: ARCPClientOptions = {
@@ -47,7 +47,7 @@ const TEST_CLIENT: ARCPClientOptions = {
4747
*/
4848
function assertBound(
4949
client: ARCPClient | null,
50-
): Effect.Effect<ARCPClient, never> {
50+
): Effect.Effect<ARCPClient> {
5151
return client === null
5252
? Effect.die("ARCPClientService is unbound in test")
5353
: Effect.succeed(client);
@@ -197,7 +197,7 @@ describe("ARCPClientLayer + ARCPClientService", () => {
197197
);
198198

199199
const collected = yield* collectFiber;
200-
return Array.from(collected).map((env) => {
200+
return [...collected].map((env) => {
201201
const ep = env.payload as { kind?: string };
202202
return ep.kind;
203203
});
@@ -284,7 +284,7 @@ describe("subscribeEnvelopes fan-out", () => {
284284

285285
const [c1, c2, c3] = yield* Effect.all([f1, f2, f3]);
286286
return [c1, c2, c3].map((chunk) => {
287-
const env = Array.from(chunk)[0];
287+
const env = [...chunk][0];
288288
const ep = env?.payload as { kind?: string } | undefined;
289289
return ep?.kind;
290290
});

0 commit comments

Comments
 (0)