- Docs: For clarity, rename grep-jsdoc.js to jsdoc-check-overly-generic-types.js
- Docs: Move GenericCallback to typedefs.js for possible reuse - npm: Update "grep-doc" to "types-doc" for greater clarity
This commit is contained in:
@@ -5,14 +5,9 @@
|
|||||||
|
|
||||||
let cbid = 0;
|
let cbid = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @callback module:EmbeddedSVGEdit.GenericCallback
|
|
||||||
* @param {...*} args Signature dependent on the function
|
|
||||||
* @returns {*} Return dependent on the function
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* @callback module:EmbeddedSVGEdit.CallbackSetter
|
* @callback module:EmbeddedSVGEdit.CallbackSetter
|
||||||
* @param {module:EmbeddedSVGEdit.GenericCallback} newCallback Callback to be stored (signature dependent on function)
|
* @param {GenericCallback} newCallback Callback to be stored (signature dependent on function)
|
||||||
* @returns {undefined}
|
* @returns {undefined}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
@@ -339,7 +334,7 @@ class EmbeddedSVGEdit {
|
|||||||
/**
|
/**
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
* @param {ArgumentsArray} args Signature dependent on function
|
* @param {ArgumentsArray} args Signature dependent on function
|
||||||
* @param {module:EmbeddedSVGEdit.GenericCallback} callback
|
* @param {GenericCallback} callback
|
||||||
* @returns {Integer}
|
* @returns {Integer}
|
||||||
*/
|
*/
|
||||||
send (name, args, callback) {
|
send (name, args, callback) {
|
||||||
|
|||||||
@@ -10,6 +10,12 @@
|
|||||||
* @typedef {null|boolean|Float|string|GenericArray|PlainObject} JSON
|
* @typedef {null|boolean|Float|string|GenericArray|PlainObject} JSON
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @callback GenericCallback
|
||||||
|
* @param {...*} args Signature dependent on the function
|
||||||
|
* @returns {*} Return dependent on the function
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This should only be used for objects known to be potentially arbitrary in form.
|
* This should only be used for objects known to be potentially arbitrary in form.
|
||||||
* For those whose determination has not yet been made, simply use type `object`
|
* For those whose determination has not yet been made, simply use type `object`
|
||||||
|
|||||||
@@ -65,8 +65,7 @@ function reduceFalseMatches (file, res) {
|
|||||||
case 'editor/embedapi.js':
|
case 'editor/embedapi.js':
|
||||||
res.line = res.line.filter((line) => {
|
res.line = res.line.filter((line) => {
|
||||||
return ![
|
return ![
|
||||||
'* @param {...*} args Signature dependent on the function',
|
'* @param {...*} args Signature dependent on the function'
|
||||||
'* @returns {*} Return dependent on the function'
|
|
||||||
].includes(line);
|
].includes(line);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@@ -76,7 +75,9 @@ function reduceFalseMatches (file, res) {
|
|||||||
'* @typedef {number} Float',
|
'* @typedef {number} Float',
|
||||||
'* @typedef {object} ArbitraryObject',
|
'* @typedef {object} ArbitraryObject',
|
||||||
'* @typedef {object} ArbitraryModule',
|
'* @typedef {object} ArbitraryModule',
|
||||||
'* @typedef {*} Any'
|
'* @typedef {*} Any',
|
||||||
|
'* @param {...*} args Signature dependent on the function',
|
||||||
|
'* @returns {*} Return dependent on the function'
|
||||||
].includes(line);
|
].includes(line);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublishOnly": "npm run test-prep",
|
"prepublishOnly": "npm run test-prep",
|
||||||
"build-config": "rollup -c rollup-config.config.js",
|
"build-config": "rollup -c rollup-config.config.js",
|
||||||
"grep-doc": "node grep-jsdoc",
|
"types-doc": "node jsdoc-check-overly-generic-types.js",
|
||||||
"open-es-allext": "opn http://localhost:8000/editor/svg-editor-es.html?extensions=ext-arrows.js,ext-closepath.js,ext-foreignobject.js,ext-helloworld.js,ext-mathjax.js,ext-php_savefile.js,ext-server_moinsave.js,ext-server_opensave.js,ext-webappfind.js,ext-xdomain-messaging.js",
|
"open-es-allext": "opn http://localhost:8000/editor/svg-editor-es.html?extensions=ext-arrows.js,ext-closepath.js,ext-foreignobject.js,ext-helloworld.js,ext-mathjax.js,ext-php_savefile.js,ext-server_moinsave.js,ext-server_opensave.js,ext-webappfind.js,ext-xdomain-messaging.js",
|
||||||
"build-doc": "rm -rf docs/jsdoc/*;jsdoc --pedantic -c docs/jsdoc-config.json editor",
|
"build-doc": "rm -rf docs/jsdoc/*;jsdoc --pedantic -c docs/jsdoc-config.json editor",
|
||||||
"build-html": "node build-html.js",
|
"build-html": "node build-html.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user