AI Disclosure: This page was generated by an LLM and may contain inaccuracies. Hand-crafted documentation will be implemented over time on the road to 1.0
definePluginManifest
Since Plugin API: 1.0.0
Signature
export function definePluginManifest<const T extends PluginManifest>(manifest: T): Readonly<T> {
const result = validateManifest(manifest);
if (!result.valid) {
throw new Error(`Invalid plugin manifest: ${result.errors.join("; ")}`);
}
return Object.freeze({
...manifest,
permissions: manifest.permissions ?
Object.freeze([...manifest.permissions])
: undefined,
icons: manifest.icons ? Object.freeze([...manifest.icons]) : undefined,
}) as Readonly<T>;
}