Migrate old externs 2/x

This commit is contained in:
2026-06-14 05:53:32 +08:00
parent 8702d252ff
commit 77a1e5c22e
84 changed files with 489 additions and 401 deletions
@@ -1,6 +1,6 @@
/** @constructor Plugin Interface */
Astro.Blog.AstroEdit.IPlugin = function(){};
/** @type {String} */
/** @type {string} */
Astro.Blog.AstroEdit.IPlugin.id;
/** @type {Function} */
Astro.Blog.AstroEdit.IPlugin.setFromData;
@@ -1,8 +1,7 @@
/** @type {object} */
Astro.Blog.AstroEdit.SmartInput.Definition = {};
/** @type {String} */
Astro.Blog.AstroEdit.SmartInput.Definition.desc;
/** @type {String} */
Astro.Blog.AstroEdit.SmartInput.Definition.module;
/** @type {object} */
Astro.Blog.AstroEdit.SmartInput.Definition.option;
/**
* @typedef {{
* module: string,
* desc: string,
* }}
*/
Astro.Blog.AstroEdit.SmartInput.Definition;
@@ -7,12 +7,14 @@ Astro.Blog.Components.Bubble.prototype.init;
/** @type {Function} */
Astro.Blog.Components.Bubble.prototype.blurp;
/** @type {Function}
* @param {String} mesg
/**
* @param {string} mesg
* @return {void}
*/
Astro.Blog.Components.Bubble.prototype.pop = function( mesg ) { };
Astro.Blog.Components.Bubble.prototype.pop = function(mesg) {};
/** @type {Function}
* @param {String} color
/**
* @param {string} color
* @return {void}
*/
Astro.Blog.Components.Bubble.prototype.setColor = function( color ) { };
Astro.Blog.Components.Bubble.prototype.setColor = function(color) {};
@@ -4,9 +4,9 @@ Astro.Blog.Components.SiteFile = function() {};
/** @type {Function} */
Astro.Blog.Components.SiteFile.loadInfo;
/** @type {String} */
/** @type {string} */
Astro.Blog.Components.SiteFile.hash;
/** @type {String} */
/** @type {string} */
Astro.Blog.Components.SiteFile.id;
/** @type {String} */
/** @type {string} */
Astro.Blog.Components.SiteFile.type;
+1 -1
View File
@@ -2,4 +2,4 @@
Astro.Blog.Config = function() {};
/** @type {Function} */
Astro.Blog.Config.get;
Astro.Blog.Config.prototype.get;
@@ -1,8 +0,0 @@
/** @type {Object} */
Astro.Blog.Events.Responsive = {};
/** @type {Object} */
Astro.Blog.Events.Responsive.data = {};
/** @type {Number} */
Astro.Blog.Events.Responsive.data.ratio = {};
-2
View File
@@ -1,2 +0,0 @@
/** @type {Object} */
Astro.Blog.Events = {};
+15 -15
View File
@@ -1,24 +1,24 @@
/** @constructor */
Astro.utils.Date = function() {};
/** @type {Function}*/
Astro.utils.Date.pretty;
/** @type {Function}*/
Astro.utils.Date.prettyDay;
/** @type {Function}*/
Astro.utils.Date.diff;
/** @type {Function}*/
Astro.utils.Date.smstamp;
/** @type {Function}*/
Astro.utils.Date.chinese;
/** @type {Function} */
Astro.utils.Date.prototype.pretty = function() {};
/** @type {Function} */
Astro.utils.Date.prototype.prettyDay = function() {};
/** @type {Function} */
Astro.utils.Date.prototype.diff = function() {};
/** @type {Function} */
Astro.utils.Date.prototype.smstamp = function() {};
/** @type {Function} */
Astro.utils.Date.prototype.chinese = function() {};
/** @const*/
/** @const */
Astro.utils.Date.MONTH;
/** @const*/
/** @const */
Astro.utils.Date.MONTH_ABBR;
/** @const*/
/** @const */
Astro.utils.Date.DAY;
/** @const*/
/** @const */
Astro.utils.Date.DAY_ABBR;
/** @const*/
/** @const */
Astro.utils.Date.CAP_MONTHS;
+1 -1
View File
@@ -1,7 +1,7 @@
/** @constructor */
var BotanEvent = function (){};
/** @type {object} */
/** @type {*} */
BotanEvent.data;
/** @type {Function} */
+15 -8
View File
@@ -1,9 +1,16 @@
/** @constructor */
Components.MessageBox = function() {};
/**
* @constructor
* @param {string} title
* @param {string|HTMLElement} content
* @param {string} yes
* @param {string} no
* @param {function(boolean, ...?): void} handler
*/
Components.MessageBox = function(title, content, yes, no, handler) {};
/** @type {Function} */
Components.MessageBox.setHandler;
/** @type {Function} */
Components.MessageBox.show;
/** @type {Function} */
Components.MessageBox.close;
/** @param {function(boolean, ...?): void} handler */
Components.MessageBox.prototype.setHandler = function(handler) {};
/** @type {function(): void} */
Components.MessageBox.prototype.show = function() {};
/** @type {function(): void} */
Components.MessageBox.prototype.close = function() {};
@@ -1,7 +1,7 @@
/** @type Object */
Components.Vim.Actions = {};
/** @type constructor */
/** @constructor */
Components.Vim.Actions.FIND = function(){};
/** @type Function */
@@ -5,7 +5,7 @@ Components.Vim.Controls.ActionEvent = function(){};
Components.Vim.Controls.ActionEvent.target;
/** @type {Components.Vim.Syntax.TokenMatch} */
Components.Vim.Controls.ActionEvent.range;
/** @type {Components.Vim.Syntax.Number} */
/** @type {Number} */
Components.Vim.Controls.ActionEvent.count;
/** @type String */
Components.Vim.Controls.ActionEvent.key;
+2 -2
View File
@@ -59,8 +59,8 @@ Components.Vim.Cursor.Y;
Components.Vim.Cursor.aPos;
/** @type Number */
Components.Vim.Cursor.cols;
/** @type message */
Components.Vim.Cursor.string;
/** @type {string} */
Components.Vim.Cursor.message;
/** @type Object */
Components.Vim.Cursor.position;
/** @type Number */
@@ -8,7 +8,7 @@ Components.Vim.LineBuffer.prev;
/** @type {Components.Vim.LineBuffer} */
Components.Vim.LineBuffer.nextLine;
/** @type EventDispatcher */
/** @type {EventDispatcher} */
Components.Vim.LineBuffer.dispatcher;
/** @type Function */
@@ -46,5 +46,5 @@ Components.Vim.LineFeeder.docPos;
Components.Vim.LineFeeder.line;
/** @type String */
Components.Vim.LineFeeder.lineStat;
/** @type {String} */
/** @type {string} */
Components.Vim.LineFeeder.content;
+1 -1
View File
@@ -32,7 +32,7 @@ Dandelion.id = function() {};
Dandelion.tag = function() {};
/** @type {Function} */
Dandelion.name = function() {};
Dandelion.gname = function() {};
/** @type {Function} */
Dandelion.glass = function() {};
+4
View File
@@ -0,0 +1,4 @@
/** @constructor
* @implements {EventTarget}
**/
var EventDispatcher = function() {};
+3 -3
View File
@@ -2,10 +2,10 @@
System.Cycle.Trigger = function (){}
/** @type {Function} */
System.Cycle.Trigger.register;
System.Cycle.Trigger.prototype.register = function() {};
/** @type {Function} */
System.Cycle.Trigger.transition;
System.Cycle.Trigger.prototype.transition = function() {};
/** @type {Function} */
System.Cycle.Trigger.height;
System.Cycle.Trigger.prototype.height = function() {};
+6 -3
View File
@@ -1,4 +1,7 @@
/** @constructor
* @extends {System.utils.IKey}
/**
* @constructor
* @extends {System.utils.IKey}
* @param {string} key
* @param {*} data
*/
System.utils.DataKey = function (){}
System.utils.DataKey = function(key, data) {};
+1 -1
View File
@@ -3,7 +3,7 @@
*/
System.utils.EventKey = function (){};
/** @type {String} */
/** @type {string} */
System.utils.EventKey.type;
/** @type {Function} */
+10 -6
View File
@@ -1,11 +1,15 @@
/** @constructor */
System.utils.IKey = function (){}
/**
* @constructor
* @param {string} keyName
* @param {string} keyValue
*/
System.utils.IKey = function(keyName, keyValue) {};
/** @type {string} */
System.utils.IKey.keyName;
System.utils.IKey.prototype.keyName;
/** @type {object} */
System.utils.IKey.keyValue;
/** @type {string} */
System.utils.IKey.prototype.keyValue;
/** @type {Function} */
/** @type {function(...?): !Array<!System.utils.IKey>} */
System.utils.IKey.quickDef;
+4 -4
View File
@@ -1,10 +1,10 @@
/** @constructor */
System.utils.Perf = function (){}
/** @type {String} */
System.utils.Perf.uuid;
/** @type {string} */
System.utils.Perf.prototype.uuid;
/** @type {Function} */
System.utils.Perf.ArrayReverse;
System.utils.Perf.prototype.ArrayReverse;
/** @type {Function} */
System.utils.Perf.CountSubstr;
System.utils.Perf.prototype.CountSubstr;
+1 -1
View File
@@ -1,4 +1,4 @@
/** @type {Object} */
_AstConf_.Article = {};
/** @type {String} */
/** @type {string} */
_AstConf_.Article.id;
+28 -28
View File
@@ -1,30 +1,30 @@
/** @type {!Object<string, *>} */
_AstConf_.AstroEdit = {};
/** @type {String} */
_AstConf_.AstroEdit.article_id;
/** @type {!Object<string, *>} */
_AstConf_.AstroEdit.paths = {};
/** @type {string} */
_AstConf_.AstroEdit.paths.set_article;
/** @type {string} */
_AstConf_.AstroEdit.paths.get_article;
/** @type {string} */
_AstConf_.AstroEdit.paths.list_articles;
/** @type {string} */
_AstConf_.AstroEdit.paths.get_drafts;
/** @type {string} */
_AstConf_.AstroEdit.paths.get_files;
/** @type {string} */
_AstConf_.AstroEdit.paths.set_file;
/**
* @typedef {{
* article_id: string,
* paths: !_AstConf_.AstroEdit.Paths,
* tags: !Object<string, *>,
* sections: !Object<string, *>,
* flags: !_AstConf_.AstroEdit.Flags
* }}
*/
_AstConf_.AstroEdit;
/** @type {object} */
_AstConf_.AstroEdit.tags;
/** @type {object} */
_AstConf_.AstroEdit.sections;
/**
* @typedef {{
* set_article: string,
* get_article: string,
* list_articles: string,
* get_drafts: string,
* get_files: string,
* set_file: string
* }}
*/
_AstConf_.AstroEdit.Paths;
/** @type {!Object<string, *>} */
_AstConf_.AstroEdit.flags = {};
/** @type {string} */
_AstConf_.AstroEdit.flags.URICount;
/** @type {string} */
_AstConf_.AstroEdit.flags.URISet;
/**
* @typedef {{
* URICount: string,
* URISet: string
* }}
*/
_AstConf_.AstroEdit.Flags;
+2 -2
View File
@@ -1,6 +1,6 @@
/** @type {Object} */
_AstConf_.Comment = {};
/** @type {String} */
/** @type {string} */
_AstConf_.Comment.processor;
/** @type {String} */
/** @type {string} */
_AstConf_.Comment.siteKey;
+1 -1
View File
@@ -2,5 +2,5 @@
_AstConf_.Control = {};
/** @type {Object} */
_AstConf_.Control.action;
/** @type {String} */
/** @type {string} */
_AstConf_.Control.action.del;
+2 -2
View File
@@ -1,8 +1,8 @@
/** @type {Object} */
_AstConf_.Login = {};
/** @type {String} */
/** @type {string} */
_AstConf_.Login.formAct;
/** @type {String} */
/** @type {string} */
_AstConf_.Login.sHeat;
/** @type {Number} */
_AstConf_.Login.sTTR;
@@ -1,4 +1,4 @@
/** @type {Object} */
_AstConf_.Notification = {};
/** @type {String} */
/** @type {string} */
_AstConf_.Notification.processor;
+7 -7
View File
@@ -1,23 +1,23 @@
/** @type {Object} */
_AstConf_.SiteFile = {};
/** @type {String} */
/** @type {string} */
_AstConf_.SiteFile.f_host;
/** @type {Object} */
_AstConf_.SiteFile.path;
/** @type {String} */
/** @type {string} */
_AstConf_.SiteFile.path.download;
/** @type {String} */
/** @type {string} */
_AstConf_.SiteFile.path.info;
/** @type {Object} */
_AstConf_.SiteFile.path.image;
/** @type {String} */
/** @type {string} */
_AstConf_.SiteFile.path.image.small;
/** @type {String} */
/** @type {string} */
_AstConf_.SiteFile.path.image.medium;
/** @type {String} */
/** @type {string} */
_AstConf_.SiteFile.path.image.large;
/** @type {String} */
/** @type {string} */
_AstConf_.SiteFile.path.image.original;
/** @type {Array} */
_AstConf_.SiteFile.files;
+3 -3
View File
@@ -1,9 +1,9 @@
/** @type {Object} */
_AstConf_.UserInfo = {};
/** @type {String} */
/** @type {string} */
_AstConf_.UserInfo.name;
/** @type {String} */
/** @type {string} */
_AstConf_.UserInfo.website;
/** @type {String} */
/** @type {string} */
_AstConf_.UserInfo.avatar;
+26 -34
View File
@@ -1,35 +1,27 @@
/** @type {Object} */
_AstJson_.AJaxGetArticle = {};
/**
* @typedef {{
* status: boolean,
* ref_id: string,
* article_id: string,
* entry: !_AstJson_.AJaxGetArticle.Entry
* }}
*/
_AstJson_.AJaxGetArticle;
/** @type {Boolean} */
_AstJson_.AJaxGetArticle.status;
/** @type {String} */
_AstJson_.AJaxGetArticle.ref_id;
/** @type {String} */
_AstJson_.AJaxGetArticle.article_id;
/** @type {Object} */
_AstJson_.AJaxGetArticle.entry;
/** @type {String} */
_AstJson_.AJaxGetArticle.entry._id;
/** @type {String} */
_AstJson_.AJaxGetArticle.entry.slug;
/** @type {Boolean} */
_AstJson_.AJaxGetArticle.entry.archived;
/** @type {String} */
_AstJson_.AJaxGetArticle.entry.date_created;
/** @type {Boolean} */
_AstJson_.AJaxGetArticle.entry.draft;
/** @type {Boolean} */
_AstJson_.AJaxGetArticle.entry.featured;
/** @type {String} */
_AstJson_.AJaxGetArticle.entry.date_modified;
/** @type {String} */
_AstJson_.AJaxGetArticle.entry.date_published;
/** @type {Array} */
_AstJson_.AJaxGetArticle.entry.tags;
/** @type {Array} */
_AstJson_.AJaxGetArticle.entry.section;
/** @type {String} */
_AstJson_.AJaxGetArticle.entry.text;
/** @type {String} */
_AstJson_.AJaxGetArticle.entry.title;
/**
* @typedef {{
* _id: string,
* slug: string,
* archived: boolean,
* date_created: string,
* draft: boolean,
* featured: boolean,
* date_modified: string,
* date_published: string,
* tags: !Array<string>,
* section: !Array<string>,
* text: string,
* title: string
* }}
*/
_AstJson_.AJaxGetArticle.Entry;
@@ -8,11 +8,11 @@ _AstJson_.AJaxGetDrafts.entries;
/** @type {Object} */
_AstJson_.AJaxGetDrafts.entry = {};
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetDrafts.entry.content;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetDrafts.entry.date;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetDrafts.entry._id;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetDrafts.entry.title;
@@ -1,13 +1,13 @@
/** @type {Object} */
_AstJson_.AJaxGetFiles.Request = {};
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.Request.from;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.Request.to;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.Request.group;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.Request.listFiles;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.Request.aid;
@@ -8,17 +8,17 @@ _AstJson_.AJaxGetFiles.files;
/** @type {Object} */
_AstJson_.AJaxGetFiles.file = {};
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.file.author;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.file.cCount;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.file.date;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.file.hash;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.file.id;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.file.name;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetFiles.file.src_location;
@@ -1,8 +1,8 @@
/** @type {Object} */
_AstJson_.AJaxGetNotis = {};
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetNotis.mesg;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetNotis.id;
/** @type {String} */
/** @type {string} */
_AstJson_.AJaxGetNotis.date;
+10 -10
View File
@@ -3,27 +3,27 @@ _AstJson_.SiteFile = {};
/** @type {Boolean} */
_AstJson_.SiteFile.status;
/** @type {String} */
/** @type {string} */
_AstJson_.SiteFile.message;
/** @type {Object} */
_AstJson_.SiteFile.file;
/** @type {String} */
/** @type {string} */
_AstJson_.SiteFile.file.date_created;
/** @type {String} */
/** @type {string} */
_AstJson_.SiteFile.file.name;
/** @type {String} */
/** @type {string} */
_AstJson_.SiteFile.file.id;
/** @type {String} */
/** @type {string} */
_AstJson_.SiteFile.file.nickname;
/** @type {String} */
/** @type {string} */
_AstJson_.SiteFile.file.type;
/** @type {String} */
/** @type {string} */
_AstJson_.SiteFile.file.src_location;
/** @type {Object} */
_AstConf_.SiteFile.thumbes;
/** @type {String} */
/** @type {string} */
_AstConf_.SiteFile.thumbs.small;
/** @type {String} */
/** @type {string} */
_AstConf_.SiteFile.thumbs.medium;
/** @type {String} */
/** @type {string} */
_AstConf_.SiteFile.thumbs.large;