blockly > common > createBlockDefinitionsFromJsonArray

common.createBlockDefinitionsFromJsonArray() function

Define blocks from an array of JSON block definitions, as might be generated by the Blockly Developer Tools.

Signature:

export declare function createBlockDefinitionsFromJsonArray(jsonArray: any[]): {
    [key: string]: BlockDefinition;
};

Parameters

Parameter Type Description
jsonArray any[] An array of JSON block definitions.

Returns:

{ [key: string]: BlockDefinition; }

A map of the block definitions created.