Skip to main content Link Search Menu Expand Document (external link)

Headers.ts overview

Since v1.0.0


Exports Grouped by Category


combinators

get

Signature

declare const get: {
  (key: string): (self: Headers) => Option.Option<string>
  (self: Headers, key: string): Option.Option<string>
}

Source

Since v1.0.0

has

Signature

declare const has: { (key: string): (self: Headers) => boolean; (self: Headers, key: string): boolean }

Source

Since v1.0.0

merge

Signature

declare const merge: { (headers: Headers): (self: Headers) => Headers; (self: Headers, headers: Headers): Headers }

Source

Since v1.0.0

redact

Signature

declare const redact: {
  (key: string | RegExp | ReadonlyArray<string | RegExp>): (self: Headers) => Record<string, string | Redacted.Redacted>
  (self: Headers, key: string | RegExp | ReadonlyArray<string | RegExp>): Record<string, string | Redacted.Redacted>
}

Source

Since v1.0.0

remove

Signature

declare const remove: { (key: string): (self: Headers) => Headers; (self: Headers, key: string): Headers }

Source

Since v1.0.0

set

Signature

declare const set: {
  (key: string, value: string): (self: Headers) => Headers
  (self: Headers, key: string, value: string): Headers
}

Source

Since v1.0.0

setAll

Signature

declare const setAll: { (headers: Input): (self: Headers) => Headers; (self: Headers, headers: Input): Headers }

Source

Since v1.0.0

constructors

empty

Signature

declare const empty: Headers

Source

Since v1.0.0

fromInput

Signature

declare const fromInput: (input?: Input) => Headers

Source

Since v1.0.0

unsafeFromRecord

Signature

declare const unsafeFromRecord: (input: Record.ReadonlyRecord<string, string>) => Headers

Source

Since v1.0.0

fiber refs

currentRedactedNames

Signature

declare const currentRedactedNames: FiberRef.FiberRef<ReadonlyArray<string | RegExp>>

Source

Since v1.0.0

models

Headers (interface)

Signature

export interface Headers extends Redactable {
  readonly [HeadersTypeId]: HeadersTypeId
  readonly [key: string]: string
}

Source

Since v1.0.0

Input (type alias)

Signature

type Input =
  | Record.ReadonlyRecord<string, string | ReadonlyArray<string> | undefined>
  | Iterable<readonly [string, string]>

Source

Since v1.0.0

refinements

isHeaders

Signature

declare const isHeaders: (u: unknown) => u is Headers

Source

Since v1.0.0

schemas

schema

Signature

declare const schema: Schema.Schema<Headers, Record.ReadonlyRecord<string, string>>

Source

Since v1.0.0

schemaFromSelf

Signature

declare const schemaFromSelf: Schema.Schema<Headers>

Source

Since v1.0.0

type ids

HeadersTypeId

Signature

declare const HeadersTypeId: unique symbol

Source

Since v1.0.0

HeadersTypeId (type alias)

Signature

type HeadersTypeId = typeof HeadersTypeId

Source

Since v1.0.0