Stay organized with collections
Save and categorize content based on your preferences.
blockly > CodeGenerator > definitions_
CodeGenerator.definitions_ property
A dictionary of definitions to be printed before the code.
Signature:
protected definitions_: {
[key: string]: string;
};
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["`CodeGenerator.definitions_` is a dictionary containing definitions to be printed before the generated code."],["This property is used to store code snippets, like function or variable declarations, that are needed for the main code to function correctly."],["It is protected, meaning it's primarily intended for internal use within the CodeGenerator class or its subclasses."],["The keys of the dictionary are strings representing the names of the definitions, while the values are the corresponding code strings."]]],[]]