Skip to main content

Function: getBlockTypeCounts()

function getBlockTypeCounts(block, opt_stripFollowing?): object;

Defined in: packages/blockly/core/common.ts:240

Get a map of all the block's descendants mapping their type to the number of children with that type.

Parameters

ParameterTypeDescription
blockBlockThe block to map.
opt_stripFollowing?booleanOptionally ignore all following statements (blocks that are not inside a value or statement input of the block).

Returns

object

Map of types to type counts for descendants of the bock.