Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
blockly > isIcon
Funzione isIcon()
Protezione dei tipi che verifica se l'oggetto dato è un IIcon.
Firma:
export declare function isIcon(obj: any): obj is IIcon;
Parametri
Parametro |
Tipo |
Descrizione |
obj |
qualsiasi |
|
Resi:
obj è IIcon
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-09-12 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2024-09-12 UTC."],[[["`isIcon()` is a type guard function in Blockly."],["It checks if a given object is an instance of the `IIcon` interface."],["The function accepts any object as input and returns a boolean indicating whether the object is an `IIcon`."]]],["The `isIcon()` function is a type guard that determines if an object is an `IIcon`. It accepts any object (`obj`) as input. The function returns a boolean, indicating whether the input object satisfies the `IIcon` interface. The primary action is to verify the type of the provided object against the `IIcon` definition, ensuring type safety within the code.\n"]]