Skip to content
EliteChart

isPluginMeta

Documentation


Documentation / @elitechart/core / isPluginMeta

code
function isPluginMeta(x): x is PluginMeta;

Defined in: plugin/types.ts:190

Structural guard — checks shape only, not interface-version support. The registry does version checking as a separate step so it can report a more specific reason to the caller.

Parameters

x

unknown

Returns

x is PluginMeta

Example

code
import { isPluginMeta } from '@elitechart/core';
const raw: unknown = await fetchPluginManifest(url);
if (isPluginMeta(raw)) console.log(`loaded plugin ${raw.id}`);