blockly > kayıt otoritesi > hasItem
registry.hasItem() işlevi
Kayıt defterinin belirtilen tür ve ada sahip bir öğe içerip içermediğini döndürür.
İmza:
export declare function hasItem<T>(type: string | Type<T>, name: string): boolean;
Parametreler
Parametre |
Tür |
Açıklama |
tür |
dize | Tür<T> |
Eklentinin türü. (ör. Alan, Oluşturucu) |
ad |
dize |
Eklentinin adı. (Ör. "field_angle", "geras") |
Şunu döndürür:
boolean
Kayıt defterinde belirtilen tür ve ada sahip bir öğe varsa doğru, aksi takdirde false değerini alır.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-08-21 UTC.
[null,null,["Son güncelleme tarihi: 2024-08-21 UTC."],[[["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`."]]],[]]