Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/io-ts-http/src/httpRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export const GenericHttpRequest = optionalized({
// DISCUSS: renaming this to something more specific, e.g. route, or path, or routeParams, or pathParams
params: t.record(t.string, t.string),
query: t.record(t.string, t.union([t.string, t.array(t.string)])),
headers: optional(t.record(t.string, t.string)),
headers: optional(
t.record(t.string, t.union([t.string, t.boolean, t.array(t.string)])),
),
body: optional(Json),
});

Expand Down Expand Up @@ -42,7 +44,7 @@ type EmitOutputTypeErrors<

type QueryValue = string | string[] | undefined;
type ParamValue = string | undefined;
type HeaderValue = string | undefined;
type HeaderValue = string | string[] | boolean | undefined;

type EmitPropsErrors<P extends HttpRequestCombinatorProps> = {
params?: EmitOutputTypeErrors<P['params'], ParamValue, 'string | undefined'>;
Expand Down
Loading