( schema: Schema.Schema<A, I, R>, options?: ParseOptions | undefined )
| 73 | * @category schema |
| 74 | */ |
| 75 | export const schemaHeaders = <A, I extends Readonly<Record<string, string | undefined>>, R>( |
| 76 | schema: Schema.Schema<A, I, R>, |
| 77 | options?: ParseOptions | undefined |
| 78 | ) => { |
| 79 | const parse = Schema.decodeUnknown(schema, options) |
| 80 | return <E>(self: HttpIncomingMessage<E>): Effect.Effect<A, ParseResult.ParseError, R> => parse(self.headers) |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * @since 1.0.0 |