Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IMutable

Represents a mutable URL

Hierarchy

Index

Properties

hash

hash: string

host

host: string

hostname

hostname: string

href

href: string

origin

origin: string

password

password: string

pathname

pathname: string

port

port: string

protocol

protocol: string

search

search: string

searchParams

searchParams: ISearchParametersImmutable

username

username: string

value

value: string

Methods

__@iterator

  • __@iterator(): IterableIterator<string>

__@toPrimitive

  • __@toPrimitive(hint: "string" | "number" | "default"): string | number

__@toStringTag

  • __@toStringTag(): string

get

  • get(): string

set

toJSON

  • toJSON(key: string): any | number | string | boolean | null
  • Converts the primitive into it's JSON representation

    Parameters

    • key: string

      Will be one of:

      • if this object is a property value, the property name
      • if it is in an array, the index in the array, as a string
      • an empty string if JSON.stringify() was directly called on this object

    Returns any | number | string | boolean | null

    the object to serialize with JSON.stringify

toString

  • toString(): string
  • Converts the primitive into it's string representation. Often has a unit value associated with it such as 125ms

    Returns string

valueOf

  • valueOf(): string | number
  • Primitives must implement the legacy valueOf interface. Usually just forwards to the newer Symbol.toPrimitive API

    Returns string | number