validateToolbarItems
Checks an environment's toolbar contribution and returns it, throwing on a malformed item or a duplicate id. Slots carry no id and are not checked for one.
@internote/canvas-sdkOn this page
import { validateToolbarItems } from '@internote/canvas-sdk';A contribution is data, so a problem with it is an authoring bug and surfaces loudly rather than rendering half a bar. The headless host runs it on every contribution it resolves.
#Signature
(items: ToolbarContribution[], environmentName: string): ToolbarContribution[]#Parameters
itemsThe items the environment's
toolbar function returned.environmentNameThe environment's name, for the error message.
#Returns
The same items.
Declared in packages/canvas-sdk/src/toolbar/types.ts:197.