Link Search Menu Expand Document

IP overview

Added in v1.0.0


Table of contents


utils

IP

Signature

export declare const IP: t.BrandC<t.StringC, IPBrand>

Added in v1.0.0

IP (type alias)

Signature

export type IP = t.Branded<string, IPBrand>

Added in v1.0.0

IPBrand (interface)

Signature

export interface IPBrand {
  readonly IP: unique symbol
}

Added in v1.0.0

IPv4

Signature

export declare const IPv4: t.BrandC<t.StringC, IPv4Brand>

Added in v1.0.0

IPv4 (type alias)

Signature

export type IPv4 = t.Branded<string, IPv4Brand>

Added in v1.0.0

IPv4Brand (interface)

Signature

export interface IPv4Brand {
  readonly IPv4: unique symbol
}

Added in v1.0.0

IPv6

Signature

export declare const IPv6: t.BrandC<t.StringC, IPv6Brand>

Added in v1.0.0

IPv6 (type alias)

Signature

export type IPv6 = t.Branded<string, IPv6Brand>

Added in v1.0.0

IPv6Brand (interface)

Signature

export interface IPv6Brand {
  readonly IPv6: unique symbol
}

Added in v1.0.0

ipDecoder

Signature

export declare const ipDecoder: <S extends string, B extends 'any' | '4' | '6' = 'any'>(
  code?: B
) => D.Decoder<S, IPBrand & S & t.Brand<IPMap[B]>>

Added in v1.1.0