Skip to content

Commit 87116d4

Browse files
committed
uncomplain all of these errors
1 parent 4f3892b commit 87116d4

File tree

6 files changed

+25
-24
lines changed

6 files changed

+25
-24
lines changed

src/compiler/jsexecute.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const waitPromise = function*(promise) {
133133
/**
134134
* isPromise: Determine if a value is Promise-like
135135
* @param {unknown} promise The value to check
136-
* @returns {promise is PromiseLike} True if the value is Promise-like (has a .then())
136+
* @returns {boolean} True if the value is Promise-like (has a .then())
137137
*/
138138

139139
/**
@@ -457,7 +457,7 @@ runtimeFunctions.listGet = `const listGet = (list, idx) => {
457457

458458
/**
459459
* Replace a value in a list.
460-
* @param {import('../engine/variable')} list The list
460+
* @param {!Variable} list The list
461461
* @param {*} idx List index, Scratch style.
462462
* @param {*} value The new value.
463463
*/
@@ -472,7 +472,7 @@ runtimeFunctions.listReplace = `const listReplace = (list, idx, value) => {
472472

473473
/**
474474
* Insert a value in a list.
475-
* @param {import('../engine/variable')} list The list.
475+
* @param {!Variable} list The list.
476476
* @param {*} idx The Scratch index in the list.
477477
* @param {*} value The value to insert.
478478
*/
@@ -487,7 +487,7 @@ runtimeFunctions.listInsert = `const listInsert = (list, idx, value) => {
487487

488488
/**
489489
* Delete a value from a list.
490-
* @param {import('../engine/variable')} list The list.
490+
* @param {!Variable} list The list.
491491
* @param {*} idx The Scratch index in the list.
492492
*/
493493
runtimeFunctions.listDelete = `const listDelete = (list, idx) => {
@@ -505,7 +505,7 @@ runtimeFunctions.listDelete = `const listDelete = (list, idx) => {
505505

506506
/**
507507
* Return whether a list contains a value.
508-
* @param {import('../engine/variable')} list The list.
508+
* @param {!Variable} list The list.
509509
* @param {*} item The value to search for.
510510
* @returns {boolean} True if the list contains the item
511511
*/
@@ -524,7 +524,7 @@ runtimeFunctions.listContains = `const listContains = (list, item) => {
524524

525525
/**
526526
* pm: Returns whether a list contains a value, using Array.some
527-
* @param {import('../engine/variable')} list The list.
527+
* @param {!Variable} list The list.
528528
* @param {*} item The value to search for.
529529
* @returns {boolean} True if the list contains the item
530530
*/
@@ -534,7 +534,7 @@ runtimeFunctions.listContainsFastest = `const listContainsFastest = (list, item)
534534

535535
/**
536536
* Find the 1-indexed index of an item in a list.
537-
* @param {import('../engine/variable')} list The list.
537+
* @param {!Variable} list The list.
538538
* @param {*} item The item to search for
539539
* @returns {number} The 1-indexed index of the item in the list, otherwise 0
540540
*/
@@ -549,7 +549,7 @@ runtimeFunctions.listIndexOf = `const listIndexOf = (list, item) => {
549549

550550
/**
551551
* Get the stringified form of a list.
552-
* @param {import('../engine/variable')} list The list.
552+
* @param {!Variable} list The list.
553553
* @returns {string} Stringified form of the list.
554554
*/
555555
runtimeFunctions.listContents = `const listContents = list => {

src/compiler/jsgen.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@ const generatorNameVariablePool = new VariablePool('gen');
5656

5757
/**
5858
* @typedef Input
59-
* @property {() => string} asNumber
60-
* @property {() => string} asNumberOrNaN
61-
* @property {() => string} asString
62-
* @property {() => string} asBoolean
63-
* @property {() => string} asColor
64-
* @property {() => string} asUnknown
65-
* @property {() => string} asSafe
66-
* @property {() => boolean} isAlwaysNumber
67-
* @property {() => boolean} isAlwaysNumberOrNaN
68-
* @property {() => boolean} isNeverNumber
59+
* @property {Function} asNumber Returns string
60+
* @property {Function} asNumberOrNaN Returns string
61+
* @property {Function} asString Returns string
62+
* @property {Function} asBoolean Returns string
63+
* @property {Function} asColor Returns string
64+
* @property {Function} asUnknown Returns string
65+
* @property {Function} asSafe Returns string
66+
* @property {Function} isAlwaysNumber Returns boolean
67+
* @property {Function} isAlwaysNumberOrNaN Returns boolean
68+
* @property {Function} isNeverNumber Returns boolean
6969
*/
7070

7171
/**

src/engine/thread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class Thread {
211211
*/
212212
this.generator = null;
213213
/**
214-
* @type {Object.<string, import('../compiler/compile').CompiledScript>}
214+
* @type {Object.<string, !CompiledScript>}
215215
*/
216216
this.procedures = null;
217217
this.executableHat = false;

src/extension-support/tw-scratchx-compatibility-layer.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ const wrapScratchXFunction = (originalFunction, argumentCount, async) => args =>
101101
};
102102

103103
/**
104-
* @param {string} name
105-
* @param {ScratchXDescriptor} descriptor
106-
* @param {Record<string, () => unknown>} functions
104+
* @param {string} name The extensions original name
105+
* @param {ScratchXDescriptor} descriptor The parsed scratchx extension info
106+
* @param {Record<string, Function>} functions The functions referenced by that info
107+
* @returns {!ExtensionMetadata} The converted result
107108
*/
108109
const convert = (name, descriptor, functions) => {
109110
const extensionId = generateExtensionId(name);

src/extensions/gsa_canvas/canvasData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class CanvasVar {
1010
* @param {Runtime} runtime the runtime this canvas exists inside
1111
* @param {string} id this canvas's id
1212
* @param {string} name the name of this canvas
13-
* @param {[number,number]|string|Image} [img=[1, 1]] optionally the image to be loaded into this canvas
13+
* @param {Array<number>|string|Image} [img=[1, 1]] optionally the image to be loaded into this canvas
1414
*/
1515
constructor (runtime, id, name, img = [1, 1]) {
1616
this.id = id ?? uid();

src/serialization/tw-costume-import-export.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const generateCustomFontsCSS = (fonts) => {
6262

6363
/**
6464
* @param {string} svgString SVG source
65-
* @returns {[number, number]|null} The detected rotation center of the SVG, if any.
65+
* @returns {Array<number>|null} The detected rotation center of the SVG, if any.
6666
*/
6767
const parseVectorMetadata = svgString => {
6868
// TODO: see if this is slow on large strings

0 commit comments

Comments
 (0)