Skip to content

Commit

Permalink
Lint and format (#1191)
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Stamm <[email protected]>
  • Loading branch information
timostamm authored Aug 28, 2024
1 parent ef48f10 commit f8fd18c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions packages/connect/src/connect-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 extends DescMessage>(
desc: Desc,
): MessageShape<Desc>[];
findDetails<Desc extends DescMessage>(desc: Desc): MessageShape<Desc>[];
findDetails(registry: Registry): Message[];
findDetails(typeOrRegistry: DescMessage | Registry): Message[] {
const registry =
Expand Down
3 changes: 1 addition & 2 deletions packages/connect/src/protocol-connect/error-json.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()", () => {
Expand Down Expand Up @@ -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<string, unknown>,
toJson(StructSchema, details[0]) as Record<string, unknown>,
).toEqual({ reason: "soirée 🎉", domain: "example.com" });
});
});
Expand Down

0 comments on commit f8fd18c

Please sign in to comment.