mirror of
https://github.com/google/blockly.git
synced 2025-12-15 22:00:07 +01:00
docs(blocks): block.ts and blocks/* JSDoc / formatting / etc. cleanup (#8431)
* docs(block): Improve documentation for well-known block methods Improve the JSDocs for the declarations of well-known block methods: - getDeveloperVariables - compose - decompose - saveConnections * docs(blocks): Improve block comments Fix JSDoc formatting in both core/block.ts and blocks/*, as well as making various other minor improvments. * chore(blocks): Remove one unexported const
This commit is contained in:
committed by
GitHub
parent
505f28f1a5
commit
ebb56b2ce8
@@ -1206,7 +1206,7 @@ blocks['procedures_callreturn'] = {
|
||||
this.appendDummyInput('TOPROW').appendField('', 'NAME');
|
||||
this.setOutput(true);
|
||||
this.setStyle('procedure_blocks');
|
||||
// Tooltip is set in domToMutation.
|
||||
// Tooltip is set in renameProcedure.
|
||||
this.setHelpUrl(Msg['PROCEDURES_CALLRETURN_HELPURL']);
|
||||
this.arguments_ = [];
|
||||
this.argumentVarModels_ = [];
|
||||
|
||||
@@ -438,6 +438,11 @@ const PROMPT_COMMON = {
|
||||
domToMutation: function (this: PromptCommonBlock, xmlElement: Element) {
|
||||
this.updateType_(xmlElement.getAttribute('type')!);
|
||||
},
|
||||
|
||||
// These blocks do not need JSO serialization hooks (saveExtraState
|
||||
// and loadExtraState) because the state of this object is already
|
||||
// encoded in the dropdown values.
|
||||
// XML hooks are kept for backwards compatibility.
|
||||
};
|
||||
|
||||
blocks['text_prompt_ext'] = {
|
||||
@@ -468,16 +473,11 @@ blocks['text_prompt_ext'] = {
|
||||
: Msg['TEXT_PROMPT_TOOLTIP_NUMBER'];
|
||||
});
|
||||
},
|
||||
|
||||
// This block does not need JSO serialization hooks (saveExtraState and
|
||||
// loadExtraState) because the state of this object is already encoded in the
|
||||
// dropdown values.
|
||||
// XML hooks are kept for backwards compatibility.
|
||||
};
|
||||
|
||||
type PromptBlock = Block & PromptCommonMixin & QuoteImageMixin;
|
||||
|
||||
const TEXT_PROMPT_BLOCK = {
|
||||
blocks['text_prompt'] = {
|
||||
...PROMPT_COMMON,
|
||||
/**
|
||||
* Block for prompt function (internal message).
|
||||
@@ -520,8 +520,6 @@ const TEXT_PROMPT_BLOCK = {
|
||||
},
|
||||
};
|
||||
|
||||
blocks['text_prompt'] = TEXT_PROMPT_BLOCK;
|
||||
|
||||
blocks['text_count'] = {
|
||||
/**
|
||||
* Block for counting how many times one string appears within another string.
|
||||
@@ -666,7 +664,7 @@ const QUOTE_IMAGE_MIXIN = {
|
||||
* closing double quote. The selected quote will be adapted for RTL blocks.
|
||||
*
|
||||
* @param open If the image should be open quote (“ in LTR).
|
||||
* Otherwise, a closing quote is used (” in LTR).
|
||||
* Otherwise, a closing quote is used (” in LTR).
|
||||
* @returns The new field.
|
||||
*/
|
||||
newQuote_: function (this: QuoteImageBlock, open: boolean): FieldImage {
|
||||
|
||||
Reference in New Issue
Block a user