diff --git a/packages/connect/src/connect-error.ts b/packages/connect/src/connect-error.ts index fcb08d7e5..3b7a2b63f 100644 --- a/packages/connect/src/connect-error.ts +++ b/packages/connect/src/connect-error.ts @@ -160,9 +160,7 @@ export class ConnectError extends Error { * messages. Any decoding errors are ignored, and the detail will simply be * omitted from the list. */ - findDetails( - desc: Desc, - ): MessageShape[]; + findDetails(desc: Desc): MessageShape[]; findDetails(registry: Registry): Message[]; findDetails(typeOrRegistry: DescMessage | Registry): Message[] { const registry = diff --git a/packages/connect/src/protocol-connect/error-json.spec.ts b/packages/connect/src/protocol-connect/error-json.spec.ts index 29547b6ab..4e018f315 100644 --- a/packages/connect/src/protocol-connect/error-json.spec.ts +++ b/packages/connect/src/protocol-connect/error-json.spec.ts @@ -18,7 +18,6 @@ import { fromJson, toBinary, toJson } from "@bufbuild/protobuf"; import { errorFromJson, errorToJson } from "./error-json.js"; import { codeToString } from "./code-string.js"; import { StructSchema } from "@bufbuild/protobuf/wkt"; -import type { Struct } from "@bufbuild/protobuf/wkt"; import { base64Encode } from "@bufbuild/protobuf/wire"; describe("errorToJson()", () => { @@ -193,7 +192,7 @@ describe("errorFromJson()", () => { const details = error.findDetails(StructSchema); expect(details.length).toBe(1); expect( - toJson(StructSchema, details[0] as Struct) as Record, + toJson(StructSchema, details[0]) as Record, ).toEqual({ reason: "soirée 🎉", domain: "example.com" }); }); });