blockly > BlockSvg > setOutput
متد ()BlockSvg.setOutput
تنظیم کنید که آیا این بلوک مقداری را برمی گرداند یا خیر.
امضا:
setOutput(newBoolean: boolean, opt_check?: string | string[] | null): void;
پارامترها
پارامتر | تایپ کنید | توضیحات |
---|
جدید بولی | بولی | اگر خروجی وجود داشته باشد درست است. |
opt_check | رشته | رشته[] | تهی | (اختیاری) نوع برگشتی یا فهرست انواع برگشتی. تهی یا تعریف نشده در صورت امکان برگرداندن هر نوع (مثلاً متغیر get). |
برمیگرداند:
باطل
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-10 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-10 بهوقت ساعت هماهنگ جهانی."],[[["The `setOutput` method determines if a block returns a value, indicated by the `newBoolean` parameter."],["It optionally accepts `opt_check` to specify the returned data type(s), allowing for flexibility with \"any type\" returns using null or undefined."],["This method is part of the `BlockSvg` class and does not return any value (void)."]]],["The `BlockSvg.setOutput()` method determines if a block returns a value. It accepts a boolean `newBoolean` parameter: `true` signifies an output, and `false` signifies no output. An optional `opt_check` parameter specifies the returned type or a list of types, allowing for type validation. If `opt_check` is null or undefined, any type can be returned. The method returns void.\n"]]