@wordpress/blocks
Version:
Block API for WordPress.
32 lines • 1.34 kB
TypeScript
import type { BlockBindingsSource, BlockType } from '../types';
import type { Action, BlocksStoreThunkArgs } from './types';
/**
* Add bootstrapped block type metadata to the store. These metadata usually come from
* the `block.json` file and are either statically bootstrapped from the server, or
* passed as the `metadata` parameter to the `registerBlockType` function.
*
* @param name Block name.
* @param blockType Block type metadata.
*/
export declare function addBootstrappedBlockType(name: string, blockType: Partial<BlockType>): Action;
/**
* Add unprocessed block type settings to the store. These data are passed as the
* `settings` parameter to the client-side `registerBlockType` function.
*
* @param name Block name.
* @param blockType Unprocessed block type settings.
*/
export declare function addUnprocessedBlockType(name: string, blockType: Partial<BlockType>): ({ dispatch }: BlocksStoreThunkArgs) => void;
/**
* Adds new block bindings source.
*
* @param source The source to register.
*/
export declare function addBlockBindingsSource(source: BlockBindingsSource): Action;
/**
* Removes existing block bindings source.
*
* @param name Name of the source to remove.
*/
export declare function removeBlockBindingsSource(name: string): Action;
//# sourceMappingURL=private-actions.d.ts.map