Skip to main content

Function: getAllItems()

function getAllItems<T>(
type,
opt_cased?,
opt_throwIfMissing?
):
| {
[key: string]: T | ((...p1) => T) | null;
}
| null;

Defined in: packages/blockly/core/registry.ts:345

Returns a map of items registered with the given type.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
typestring | Type<T>The type of the plugin. (e.g. Category)
opt_cased?booleanWhether or not to return a map with cased keys (rather than caseless keys). False by default.
opt_throwIfMissing?booleanWhether or not to throw an error if we are unable to find the object. False by default.

Returns

| { [key: string]: T | ((...p1) => T) | null; } | null

A map of objects with the given type, or null if none exists.