Skip to content

Commit

Permalink
fix: explicit typings for body
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk committed Jan 26, 2024
1 parent e5bfce8 commit c8604f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ export class Body {
return this.#type = "unknown";
}

[Symbol.for("Deno.customInspect")](inspect: (value: unknown) => string) {
[Symbol.for("Deno.customInspect")](
inspect: (value: unknown) => string,
): string {
const { has, used } = this;
return `${this.constructor.name} ${inspect({ has, used })}`;
}
Expand All @@ -209,7 +211,8 @@ export class Body {
// deno-lint-ignore no-explicit-any
options: any,
inspect: (value: unknown, options?: unknown) => string,
) {
// deno-lint-ignore no-explicit-any
): any {
if (depth < 0) {
return options.stylize(`[${this.constructor.name}]`, "special");
}
Expand Down

0 comments on commit c8604f8

Please sign in to comment.