Skip to content

Commit

Permalink
chore: fixed types for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasHaderer committed Jan 4, 2024
1 parent 582b03e commit 7cfecd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
10 changes: 1 addition & 9 deletions packages/server/src/lib/core/response-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,7 @@ export class ResponseImpl implements LResponse {
return this;
}

public form(
data:
| UTF8SearchParams
| URLSearchParams
| string
| Record<string, string | ReadonlyArray<string>>
| Iterable<[string, string]>
| ReadonlyArray<[string, string]>
): this {
public form(data: ConstructorParameters<typeof URLSearchParams>[0]): this {
this.headers.append("Content-Type", "application/x-www-form-urlencoded");
if (data instanceof UTF8SearchParams || data instanceof URLSearchParams) {
this.data = data.toString();
Expand Down
12 changes: 2 additions & 10 deletions packages/server/src/lib/core/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 2022. Niclas
* MIT Licensed
*/
import { CustomPropertyDescriptor, Func, Headers, UTF8SearchParams } from "@luftschloss/common";
import { CustomPropertyDescriptor, Func, Headers } from "@luftschloss/common";
import { ReadStream } from "fs";
import { ServerResponse } from "http";
import { LRequest } from "./request";
Expand All @@ -26,15 +26,7 @@ export interface LResponse {

json(object: object | string | null | boolean): this;

form(
data:
| UTF8SearchParams
| URLSearchParams
| string
| Record<string, string | ReadonlyArray<string>>
| Iterable<[string, string]>
| ReadonlyArray<[string, string]>
): this;
form(data: ConstructorParameters<typeof URLSearchParams>[0]): this;

redirect(
url: string | URL,
Expand Down

0 comments on commit 7cfecd3

Please sign in to comment.