रिसर्च सर्वे: Blockly के साथ अपने अनुभव के बारे में हमें बताएं
सर्वे शुरू करें
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
ब्लॉकली > रजिस्ट्री > getClassFromOptions
Registry.getClassFromOptions() फ़ंक्शन
दिए गए टाइप के लिए, Blockly विकल्पों से क्लास लेता है. इसका इस्तेमाल उन प्लगिन के लिए किया जाता है जो पहले से मौजूद सुविधा को ओवरराइड करते हैं. (उदाहरण: टूलबॉक्स)
हस्ताक्षर:
export declare function getClassFromOptions<T>(type: Type<T>, options: Options, opt_throwIfMissing?: boolean): (new (...p1: any[]) => T) | null;
पैरामीटर
पैरामीटर |
टाइप |
ब्यौरा |
टाइप |
टाइप<T> |
प्लगिन का टाइप. |
विकल्प |
विकल्प |
दिए गए प्लगिन की जांच करने के लिए, विकल्प ऑब्जेक्ट. |
opt_throwIfMissing |
बूलियन |
(ज़रूरी नहीं) अगर हमें प्लगिन नहीं मिलता है, तो गड़बड़ी होने या न होने का विकल्प चुनें. |
लौटाए जाने वाले प्रॉडक्ट:
(नया (...p1: any[]) => T) | शून्य
प्लगिन की क्लास.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["Retrieves the class for a specified plugin type from Blockly options, enabling customization of built-in features."],["Accepts the plugin type, options object, and an optional flag to throw an error if the plugin is not found."],["Returns the plugin's class or null if not found, facilitating plugin integration and extension."]]],["The `registry.getClassFromOptions()` function retrieves a plugin's class from Blockly options based on its type. It takes the plugin's type, an options object, and an optional boolean to determine if an error should be thrown if the plugin is missing. It returns the plugin's class or `null` if not found. This is useful for plugins, like the Toolbox, which replace default functionality, and to find the given plugin on the option object.\n"]]