diff --git a/packages/server/src/lib/core/response-impl.ts b/packages/server/src/lib/core/response-impl.ts index 0600e5c..288ebd4 100644 --- a/packages/server/src/lib/core/response-impl.ts +++ b/packages/server/src/lib/core/response-impl.ts @@ -44,15 +44,7 @@ export class ResponseImpl implements LResponse { return this; } - public form( - data: - | UTF8SearchParams - | URLSearchParams - | string - | Record> - | Iterable<[string, string]> - | ReadonlyArray<[string, string]> - ): this { + public form(data: ConstructorParameters[0]): this { this.headers.append("Content-Type", "application/x-www-form-urlencoded"); if (data instanceof UTF8SearchParams || data instanceof URLSearchParams) { this.data = data.toString(); diff --git a/packages/server/src/lib/core/response.ts b/packages/server/src/lib/core/response.ts index ff93dcd..25f827b 100644 --- a/packages/server/src/lib/core/response.ts +++ b/packages/server/src/lib/core/response.ts @@ -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"; @@ -26,15 +26,7 @@ export interface LResponse { json(object: object | string | null | boolean): this; - form( - data: - | UTF8SearchParams - | URLSearchParams - | string - | Record> - | Iterable<[string, string]> - | ReadonlyArray<[string, string]> - ): this; + form(data: ConstructorParameters[0]): this; redirect( url: string | URL,