messageTier()
Look up the tier number for a message type.
Import
Section titled “Import”import { messageTier } from "@graphrefly/ts/core";Signature
Section titled “Signature”function messageTier(t: MessageType): numberParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
t | MessageType | One of the closed-set protocol message tags. |
Returns
Section titled “Returns”The tier assigned by the compile-time tier table.
Example
Section titled “Example”messageTier("DATA"); // 3Source
Section titled “Source”packages/ts/src/protocol/messages.ts