Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
fix headers type for schemaJson
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Smart committed Dec 17, 2023
1 parent c8b763e commit 5c9a519
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/twenty-fans-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/platform": patch
---

fix headers type for schemaJson
2 changes: 1 addition & 1 deletion docs/platform/Http/ClientResponse.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Added in v1.0.0
export declare const schemaJson: <
I extends {
readonly status?: number | undefined
readonly headers?: Headers.Headers | undefined
readonly headers?: Readonly<Record<string, string>> | undefined
readonly body?: unknown
},
A
Expand Down
2 changes: 1 addition & 1 deletion packages/platform/src/Http/ClientResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const fromWeb: (request: ClientRequest.ClientRequest, source: Response) =
export const schemaJson: <
I extends {
readonly status?: number
readonly headers?: Headers.Headers
readonly headers?: Readonly<Record<string, string>>
readonly body?: unknown
},
A
Expand Down
4 changes: 2 additions & 2 deletions packages/platform/src/internal/http/clientResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class ClientResponseImpl implements ClientResponse.ClientResponse {
export const schemaJson = <
I extends {
readonly status?: number
readonly headers?: Headers.Headers
readonly headers?: Readonly<Record<string, string>>
readonly body?: unknown
},
A
Expand All @@ -157,7 +157,7 @@ export const schemaJson = <
export const schemaNoBody = <
I extends {
readonly status?: number
readonly headers?: Headers.Headers
readonly headers?: Readonly<Record<string, string>>
},
A
>(schema: Schema.Schema<I, A>) => {
Expand Down

0 comments on commit 5c9a519

Please sign in to comment.