blockly > Blok > setOutput
Block.setOutput() yöntemi
Bu bloğun değer döndürüp döndürmeyeceğini ayarlayın.
İmza:
setOutput(newBoolean: boolean, opt_check?: string | string[] | null): void;
Parametreler
Parametre |
Tür |
Açıklama |
newBoolean |
boolean |
Çıkış varsa doğru değerini döndürür. |
opt_check |
string | string[] | null |
(İsteğe bağlı) Döndürülen tür veya döndürülen türlerin listesi. Herhangi bir tür döndürülebilirse (ör. değişken alma) null veya undefined. |
İadeler:
geçersiz
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-11-30 UTC.
[null,null,["Son güncelleme tarihi: 2024-11-30 UTC."],[[["The `setOutput` method determines if a block produces a value or not."],["It takes a boolean argument (`newBoolean`) indicating the output status and an optional `opt_check` for specifying the output type(s)."],["Calling `setOutput` does not return any value (void)."]]],["The `Block.setOutput()` method determines if a block returns a value. It accepts a boolean `newBoolean`: `true` indicates an output exists, `false` otherwise. An optional `opt_check` parameter specifies the type or types returned, using a string or string array. If `null` or `undefined`, any type is acceptable. The method's return type is `void`. The key actions are setting and defining the parameters of a block's output status and its type.\n"]]