blockly > registry > getAllItems

registry.getAllItems() 函数

返回使用指定类型注册的项的映射。

Signature:

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

参数

参数 类型 说明
类型 字符串 | 类型<T> 插件的类型。(例如类别)
opt_cased boolean (可选)是否返回具有大小写键(而不是无大小写键)的映射。默认值为 false。
opt_throwIfMissing boolean (可选)如果我们找不到对象,是否要抛出错误。默认值为 false。

返回

{ [键: 字符串]: T | null | (new (...p1: any[]) => T); } | null

具有指定类型的对象的映射,如果不存在,则为 null。