GraphReFlyTS

API Reference

messageTier()

Look up the tier number for a message type.

Import

import { messageTier } from "@graphrefly/ts/core";

Signature

function messageTier(t: MessageType): number

Parameters

ParameterTypeDescription
tMessageTypeOne of the closed-set protocol message tags.

Returns

The tier assigned by the compile-time tier table.

Example

messageTier("DATA"); // 3

Source

packages/ts/src/protocol/messages.ts