Expiry
Defined in: packages/agent/src/agent/http/transforms.ts:23
Properties
Section titled “Properties”_isExpiry
Section titled “_isExpiry”
readonly
_isExpiry:true
=true
Defined in: packages/agent/src/agent/http/transforms.ts:24
Methods
Section titled “Methods”toBigInt()
Section titled “toBigInt()”toBigInt():
bigint
Defined in: packages/agent/src/agent/http/transforms.ts:61
Returns
Section titled “Returns”bigint
toHash()
Section titled “toHash()”toHash():
Uint8Array
Defined in: packages/agent/src/agent/http/transforms.ts:65
Returns
Section titled “Returns”Uint8Array
toJSON()
Section titled “toJSON()”toJSON():
JsonnableExpiry
Defined in: packages/agent/src/agent/http/transforms.ts:77
Serializes to JSON
Returns
Section titled “Returns”a JSON object with a single key, JSON_KEY_EXPIRY, whose value is the expiry as a string
toString()
Section titled “toString()”toString():
string
Defined in: packages/agent/src/agent/http/transforms.ts:69
Returns
Section titled “Returns”string
fromDeltaInMilliseconds()
Section titled “fromDeltaInMilliseconds()”
static
fromDeltaInMilliseconds(deltaInMs
):Expiry
Defined in: packages/agent/src/agent/http/transforms.ts:36
Creates an Expiry object from a delta in milliseconds. If the delta is less than 90 seconds, it is rounded to the nearest second. Otherwise, the delta is rounded down to the nearest minute, with a replica permitted drift subtracted.
Parameters
Section titled “Parameters”deltaInMs
Section titled “deltaInMs”number
The delta in milliseconds.
Returns
Section titled “Returns”Expiry
an Expiry object
fromJSON()
Section titled “fromJSON()”
static
fromJSON(input
):Expiry
Defined in: packages/agent/src/agent/http/transforms.ts:86
Deserializes a JsonnableExpiry object from a JSON string.
Parameters
Section titled “Parameters”string
The JSON string to deserialize.
Returns
Section titled “Returns”Expiry
The deserialized Expiry object.
isExpiry()
Section titled “isExpiry()”
static
isExpiry(other
):other is Expiry
Defined in: packages/agent/src/agent/http/transforms.ts:101
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”other is Expiry