Skip to main content

Class: Link

Represents a Link.

Properties​

type​

type: string

Link type.


url​

url: string

See https://github.com/nexus-rpc/api/blob/main/SPEC.md#links.

Methods​

toJSON()​

toJSON(): object

Converts this Link to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): Link & $Properties

Creates a new Link instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

Link & $Properties

Link instance

Call Signature​

static create(properties?): Link

Creates a new Link instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

Link

Link instance


decode()​

static decode(reader, length?): Link & $Properties

Decodes a Link message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

Link & $Properties

Link

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): Link & $Properties

Decodes a Link message from the specified reader or buffer, length delimited.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

Link & $Properties

Link

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified Link message. Does not implicitly temporal.api.nexus.v1.Link.verify|verify messages.

Parameters​

message​

$Properties

Link message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified Link message, length delimited. Does not implicitly temporal.api.nexus.v1.Link.verify|verify messages.

Parameters​

message​

$Properties

Link message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): Link

Creates a Link message from a plain object. Also converts values to their respective internal types.

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

Link

Link


toObject()​

static toObject(message, options?): object

Creates a plain object from a Link message. Also converts values to other types if specified.

Parameters​

message​

Link

Link

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object