Migrate old externs 7/x

This commit is contained in:
2026-06-16 08:33:04 +08:00
parent 3bc6957677
commit c2fb5b205a
51 changed files with 390 additions and 317 deletions
+2 -2
View File
@@ -3,8 +3,8 @@
* @param {string} title
* @param {string|HTMLElement} content
* @param {string} yes
* @param {string} no
* @param {function(boolean, ...?): void} handler
* @param {string=} no
* @param {function(boolean, ...?): void=} handler
*/
Components.MessageBox = function(title, content, yes, no, handler) {};
@@ -2,14 +2,14 @@
Components.Mouse.Clipboard = function() {};
/** @type {Function} */
Components.Mouse.Clipboard.init;
Components.Mouse.Clipboard.prototype.init;
/** @type {Function} */
Components.Mouse.Clipboard.setTextToCopy;
Components.Mouse.Clipboard.prototype.setTextToCopy;
/** @type {Function} */
Components.Mouse.Clipboard.onMouseOver;
Components.Mouse.Clipboard.prototype.onMouseOver;
/** @type {Function} */
Components.Mouse.Clipboard.onMouseOut;
Components.Mouse.Clipboard.prototype.onMouseOut;
/** @type {Function} */
Components.Mouse.Clipboard._textCopied;
Components.Mouse.Clipboard.prototype._textCopied;
/** @type {Function} */
Components.Mouse.Clipboard.capture;
Components.Mouse.Clipboard.prototype.capture;
@@ -1,2 +1,8 @@
/** @constructor */
Components.Mouse.ContextMenu = function() {};
/** @constructor
* @param {HTMLElement} target
* @param {Array<*>} items
* @param {string} whichButton
* @param {HTMLElement} menuInsideTarget
* @param {Object<string,*>} overrides
*/
Components.Mouse.ContextMenu = function(target, items, whichButton, menuInsideTarget, overrides) {};
+6 -2
View File
@@ -1,5 +1,9 @@
/** @constructor */
Dandelion.IDOMElement = function (){}
/** @constructor
* @extends {Dandelion.IDOMObject}
* @param {*} el
* @param {boolean} sw
*/
Dandelion.IDOMElement = function (el, sw){}
/** @type {Function} */
Dandelion.IDOMElement.prototype.getDAttribute = function() {};
+9 -6
View File
@@ -1,11 +1,14 @@
/** @constructor */
Dandelion.IDOMObject = function (){}
/** @constructor
* @param {*} obj
* @param {boolean=} sw
*/
Dandelion.IDOMObject = function (obj, sw){}
/** @type {Function} */
Dandelion.IDOMObject.addEventListener;
Dandelion.IDOMObject.prototype.addEventListener;
/** @type {Function} */
Dandelion.IDOMObject.addEventListeners;
Dandelion.IDOMObject.prototype.addEventListeners;
/** @type {Function} */
Dandelion.IDOMObject.hasListener;
Dandelion.IDOMObject.prototype.hasListener;
/** @type {Function} */
Dandelion.IDOMObject.removeEventListener;
Dandelion.IDOMObject.prototype.removeEventListener;
+6 -2
View File
@@ -19,8 +19,12 @@ Dandelion.wrapna = function() {};
/** @type {function(string): !HTMLElement} */
Dandelion.textNode = function() {};
/** @type {function(string): !HTMLElement} */
Dandelion.bubbleUp = function() {};
/**
* @param {*} elem
* @param {function(*): boolean} cond
* @return {?HTMLElement}
*/
Dandelion.bubbleUp = function(elem, cond) {};
/** @type {function(HTMLElement, function(HTMLElement): boolean): void} */
Dandelion.chainUpApply = function() {};
+8 -8
View File
@@ -1,14 +1,14 @@
/** @constructor */
System.Global = function (){}
/** @type {Boolean} */
System.Global.debug;
/** @type {boolean} */
System.Global.prototype.debug;
/** @type {Boolean} */
System.Global.IE;
/** @type {boolean} */
System.Global.prototype.IE;
/** @type {Boolean} */
System.Global.SECURE_HTTP;
/** @type {boolean} */
System.Global.prototype.SECURE_HTTP;
/** @type {Boolean} */
System.Global.MOBILE;
/** @type {boolean} */
System.Global.prototype.MOBILE;
+5 -3
View File
@@ -1,10 +1,12 @@
/** @constructor
* @extends {System.utils.IKey}
* @param {string} key
* @param {function(Event): *} callback
*/
System.utils.EventKey = function (){};
System.utils.EventKey = function (key, callback){};
/** @type {string} */
System.utils.EventKey.type;
System.utils.EventKey.prototype.type;
/** @type {Function} */
System.utils.EventKey.handler;
System.utils.EventKey.prototype.handler;
+2 -2
View File
@@ -1,14 +1,14 @@
/**
* @constructor
* @param {string} keyName
* @param {string} keyValue
* @param {*} keyValue
*/
System.utils.IKey = function(keyName, keyValue) {};
/** @type {string} */
System.utils.IKey.prototype.keyName;
/** @type {string} */
/** @type {string|System.utils.IKey} */
System.utils.IKey.prototype.keyValue;
/** @type {function(...?): !Array<!System.utils.IKey>} */
+6 -4
View File
@@ -1,4 +1,6 @@
/** @type {Object} */
_AstConf_.Article = {};
/** @type {string} */
_AstConf_.Article.id;
/**
* @typedef {{
* id: string,
* }}
*/
_AstConf_.Article;
+7 -6
View File
@@ -1,6 +1,7 @@
/** @type {Object} */
_AstConf_.Comment = {};
/** @type {string} */
_AstConf_.Comment.processor;
/** @type {string} */
_AstConf_.Comment.siteKey;
/**
* @typedef {{
* processor: string,
* siteKey: string
* }}
*/
_AstConf_.Comment;
@@ -1,4 +1,6 @@
/** @type {Object} */
_AstConf_.Notification = {};
/** @type {string} */
_AstConf_.Notification.processor;
/**
* @typedef {{
* processor: string
* }}
*/
_AstConf_.Notification;
+8 -9
View File
@@ -1,9 +1,8 @@
/** @type {Object} */
_AstConf_.UserInfo = {};
/** @type {string} */
_AstConf_.UserInfo.name;
/** @type {string} */
_AstConf_.UserInfo.website;
/** @type {string} */
_AstConf_.UserInfo.avatar;
/**
* @typedef {{
* name: string,
* website: string,
* avatar: string
* }}
*/
_AstConf_.UserInfo;
@@ -1,8 +1,8 @@
/** @type {Object} */
_AstJson_.AJaxGetNotis = {};
/** @type {string} */
_AstJson_.AJaxGetNotis.mesg;
/** @type {string} */
_AstJson_.AJaxGetNotis.id;
/** @type {string} */
_AstJson_.AJaxGetNotis.date;
/**
* @typedef {{
* id: string,
* mesg: string,
* data: string
* }}
*/
_AstJson_.AJaxGetNotis;