Skip to content

Commit

Permalink
reduce diff
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jun 19, 2024
1 parent bb8d8d9 commit 58c0256
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/utils/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import {
} from "./internal/multipart";
import { assertMethod, getRequestHeader, toWebRequest } from "./request";
import { ValidateFunction, validateData } from "./internal/validate";
import { ParsedBodySymbol, RawBodySymbol } from "./symbols";
import { hasProp } from "./internal/object";

export type { MultiPartData } from "./internal/multipart";

const RawBodySymbol = Symbol.for("h3RawBody");
const ParsedBodySymbol = Symbol.for("h3ParsedBody");
type InternalRequest<T = any> = IncomingMessage & {
[RawBodySymbol]?: Promise<Buffer | undefined>;
[ParsedBodySymbol]?: T;
Expand Down
4 changes: 0 additions & 4 deletions src/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import type {
} from "../types";
import type { H3Event } from "../event";
import { validateData, ValidateFunction } from "./internal/validate";
import { ParsedQuerySymbol } from "./symbols";
import { getRequestWebStream } from "./body";

/**
Expand All @@ -24,9 +23,6 @@ export function getQuery<
Event extends H3Event = H3Event,
_T = Exclude<InferEventInput<"query", Event, T>, undefined>,
>(event: Event): _T {
if (ParsedQuerySymbol in event) {
return event[ParsedQuerySymbol] as _T;
}
return _getQuery(event.path || "") as _T;
}

Expand Down
3 changes: 0 additions & 3 deletions src/utils/symbols.ts

This file was deleted.

0 comments on commit 58c0256

Please sign in to comment.