封鎖 >登錄檔 >hasItem
Registry.hasItem() 函式
傳回登錄檔中是否包含具有指定類型和名稱的項目。
Signature:
export declare function hasItem<T>(type: string | Type<T>, name: string): boolean;
參數
參數 |
類型 |
說明 |
類型 |
字串 |類型<T> |
外掛程式的類型。(例如欄位、轉譯器) |
名稱 |
字串 |
外掛程式的名稱。(例如:field_angle、geras) |
傳回:
布林值
如果註冊資料庫有指定類型和名稱的項目,則為「true」,否則為「false」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-21 (世界標準時間)。
[null,null,["上次更新時間:2024-08-21 (世界標準時間)。"],[[["Determines if the Blockly registry contains a specific item based on its type and name."],["Uses the `type` parameter to specify the category of the item (e.g., 'Field', 'Renderer') and the `name` parameter for its unique identifier."],["Returns `true` if an item with the given type and name exists in the registry, otherwise returns `false`."]]],[]]