vesselOnlyShows
vesselOnlyShows(
vessel):boolean
Defined in: packages/protocol/src/lib/vessel-only-shows.ts:16
Tells whether a Vessel can only change what is shown, never app data.
True when no Variant offers an Action, or when every Action in every
Variant declares effect: 'none'. An idempotent or any Action counts
as able to change data, and so does an Action that omitted effect,
because the schema parses an omitted effect as any.
Parameters
Section titled “Parameters”vessel
Section titled “vessel”defaultVariant
Section titled “defaultVariant”VariantName = ...
description
Section titled “description”string = ...
VesselId = ...
string = ...
variants
Section titled “variants”Record<VariantName, { actions: object[]; description?: string; minSize: { height: number; width: number; }; props: Record<string, unknown>; }> = ...
Returns
Section titled “Returns”boolean
Example
Section titled “Example”const marker = vesselOnlyShows(vessel) ? 'Shows only.' : 'Can also change data.';