mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Fix various jsdoc issues preventing the docs from building
This commit is contained in:
parent
5a429d90be
commit
138d7136af
8 changed files with 13 additions and 13 deletions
|
@ -30,7 +30,7 @@ class SharedDispatch {
|
||||||
* List of callback registrations for promises waiting for a response from a call to a service on another
|
* List of callback registrations for promises waiting for a response from a call to a service on another
|
||||||
* worker. A callback registration is an array of [resolve,reject] Promise functions.
|
* worker. A callback registration is an array of [resolve,reject] Promise functions.
|
||||||
* Calls to local services don't enter this list.
|
* Calls to local services don't enter this list.
|
||||||
* @type {Array.<[Function,Function]>}
|
* @type {Array.<Function[]>}
|
||||||
*/
|
*/
|
||||||
this.callbacks = [];
|
this.callbacks = [];
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ const defaultBlockPackages = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information used for converting Scratch argument types into scratch-blocks data.
|
* Information used for converting Scratch argument types into scratch-blocks data.
|
||||||
* @type {object.<ArgumentType, {shadowType: string, fieldType: string}>}}
|
* @type {object.<ArgumentType, {shadowType: string, fieldType: string}>}
|
||||||
*/
|
*/
|
||||||
const ArgumentTypeMap = (() => {
|
const ArgumentTypeMap = (() => {
|
||||||
const map = {};
|
const map = {};
|
||||||
|
|
|
@ -165,7 +165,7 @@ class Scratch3MusicBlocks {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array of info about each drum.
|
* An array of info about each drum.
|
||||||
* @type {object[]} an array of objects.
|
* @type {object[]}
|
||||||
* @param {string} name - the translatable name to display in the drums menu.
|
* @param {string} name - the translatable name to display in the drums menu.
|
||||||
* @param {string} fileName - the name of the audio file containing the drum sound.
|
* @param {string} fileName - the name of the audio file containing the drum sound.
|
||||||
*/
|
*/
|
||||||
|
@ -320,7 +320,7 @@ class Scratch3MusicBlocks {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array of info about each instrument.
|
* An array of info about each instrument.
|
||||||
* @type {object[]} an array of objects.
|
* @type {object[]}
|
||||||
* @param {string} name - the translatable name to display in the instruments menu.
|
* @param {string} name - the translatable name to display in the instruments menu.
|
||||||
* @param {string} dirName - the name of the directory containing audio samples for this instrument.
|
* @param {string} dirName - the name of the directory containing audio samples for this instrument.
|
||||||
* @param {number} [releaseTime] - an optional duration for the release portion of each note.
|
* @param {number} [releaseTime] - an optional duration for the release portion of each note.
|
||||||
|
|
|
@ -260,7 +260,7 @@ class Scratch3VideoSensingBlocks {
|
||||||
/**
|
/**
|
||||||
* An array of choices of whether a reporter should return the frame's
|
* An array of choices of whether a reporter should return the frame's
|
||||||
* motion amount or direction.
|
* motion amount or direction.
|
||||||
* @type {object[]} an array of objects
|
* @type {object[]}
|
||||||
* @param {string} name - the translatable name to display in sensor
|
* @param {string} name - the translatable name to display in sensor
|
||||||
* attribute menu
|
* attribute menu
|
||||||
* @param {string} value - the serializable value of the attribute
|
* @param {string} value - the serializable value of the attribute
|
||||||
|
@ -292,7 +292,7 @@ class Scratch3VideoSensingBlocks {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array of info about the subject choices.
|
* An array of info about the subject choices.
|
||||||
* @type {object[]} an array of objects
|
* @type {object[]}
|
||||||
* @param {string} name - the translatable name to display in the subject menu
|
* @param {string} name - the translatable name to display in the subject menu
|
||||||
* @param {string} value - the serializable value of the subject
|
* @param {string} value - the serializable value of the subject
|
||||||
*/
|
*/
|
||||||
|
@ -328,7 +328,7 @@ class Scratch3VideoSensingBlocks {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array of info on video state options for the "turn video [STATE]" block.
|
* An array of info on video state options for the "turn video [STATE]" block.
|
||||||
* @type {object[]} an array of objects
|
* @type {object[]}
|
||||||
* @param {string} name - the translatable name to display in the video state menu
|
* @param {string} name - the translatable name to display in the video state menu
|
||||||
* @param {string} value - the serializable value stored in the block
|
* @param {string} value - the serializable value stored in the block
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -205,7 +205,7 @@ class WeDo2 {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The motors which this WeDo 2.0 could possibly have.
|
* The motors which this WeDo 2.0 could possibly have.
|
||||||
* @type {[WeDo2Motor]}
|
* @type {WeDo2Motor[]}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this._motors = [new WeDo2Motor(this, 0), new WeDo2Motor(this, 1)];
|
this._motors = [new WeDo2Motor(this, 0), new WeDo2Motor(this, 1)];
|
||||||
|
|
|
@ -122,7 +122,7 @@ const flatten = function (blocks) {
|
||||||
* which block they should attach to.
|
* which block they should attach to.
|
||||||
* @param {int} commentIndex The current index of the top block in this list if it were in a flattened
|
* @param {int} commentIndex The current index of the top block in this list if it were in a flattened
|
||||||
* list of all blocks for the target
|
* list of all blocks for the target
|
||||||
* @return {[Array.<object>, int]} Tuple where first item is the Scratch VM-format block list, and
|
* @return {Array<Array.<object>|int>} Tuple where first item is the Scratch VM-format block list, and
|
||||||
* second item is the updated comment index
|
* second item is the updated comment index
|
||||||
*/
|
*/
|
||||||
const parseBlockList = function (blockList, addBroadcastMsg, getVariableId, extensions, comments, commentIndex) {
|
const parseBlockList = function (blockList, addBroadcastMsg, getVariableId, extensions, comments, commentIndex) {
|
||||||
|
@ -724,7 +724,7 @@ const specMapBlock = function (block) {
|
||||||
* which block they should attach to.
|
* which block they should attach to.
|
||||||
* @param {int} commentIndex The comment index for the block to be parsed if it were in a flattened
|
* @param {int} commentIndex The comment index for the block to be parsed if it were in a flattened
|
||||||
* list of all blocks for the target
|
* list of all blocks for the target
|
||||||
* @return {[object, int]} Tuple where first item is the Scratch VM-format block (or null if unsupported object),
|
* @return {Array.<object|int>} Tuple where first item is the Scratch VM-format block (or null if unsupported object),
|
||||||
* and second item is the updated comment index (after this block and its children are parsed)
|
* and second item is the updated comment index (after this block and its children are parsed)
|
||||||
*/
|
*/
|
||||||
const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extensions, comments, commentIndex) {
|
const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extensions, comments, commentIndex) {
|
||||||
|
|
|
@ -17,7 +17,7 @@ class StringUtil {
|
||||||
* Split a string on the first occurrence of a split character.
|
* Split a string on the first occurrence of a split character.
|
||||||
* @param {string} text - the string to split.
|
* @param {string} text - the string to split.
|
||||||
* @param {string} separator - split the text on this character.
|
* @param {string} separator - split the text on this character.
|
||||||
* @returns {[string, string]} - the two parts of the split string, or [text, null] if no split character found.
|
* @returns {string[]} - the two parts of the split string, or [text, null] if no split character found.
|
||||||
* @example
|
* @example
|
||||||
* // returns ['foo', 'tar.gz']
|
* // returns ['foo', 'tar.gz']
|
||||||
* splitFirst('foo.tar.gz', '.');
|
* splitFirst('foo.tar.gz', '.');
|
||||||
|
|
|
@ -931,8 +931,8 @@ class VirtualMachine extends EventEmitter {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the current locale and builtin messages for the VM
|
* set the current locale and builtin messages for the VM
|
||||||
* @param {[type]} locale current locale
|
* @param {!string} locale current locale
|
||||||
* @param {[type]} messages builtin messages map for current locale
|
* @param {!object} messages builtin messages map for current locale
|
||||||
* @returns {Promise} Promise that resolves when all the blocks have been
|
* @returns {Promise} Promise that resolves when all the blocks have been
|
||||||
* updated for a new locale (or empty if locale hasn't changed.)
|
* updated for a new locale (or empty if locale hasn't changed.)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue