blockly > registry > getObject
Funzione registry.getObject()
Restituisce l'oggetto per il nome e il tipo specificati.
Firma:
export declare function getObject<T>(type: string | Type<T>, name: string, opt_throwIfMissing?: boolean): T | null;
Parametri
Parametro | Tipo | Descrizione |
---|---|---|
digita | stringa | Tipo<T> | Il tipo del plug-in. (ad es. Categoria) |
nome | stringa | Il nome del plug-in. (ad es. logic_category) |
opt_throwIfMissing | boolean | (Facoltativo) Indica se generare o meno un errore se non riusciamo a trovare l'oggetto. |
Resi:
T | null
L'oggetto con il nome e il tipo specificati oppure nullo se non ne esiste nessuno.