Migrate old externs 9/x

This commit is contained in:
2026-06-17 20:48:46 +08:00
parent 00fe7ca3bb
commit 01d4eb09a6
66 changed files with 708 additions and 420 deletions
@@ -1,8 +1,8 @@
/** @constructor */
Astro.Blog.AstroEdit.SmartInput.ICandidateAction = function(){};
/** @type {function(function(): void): void} */
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.GetCandidates;
/** @type {function(function(...?): void): void} */
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.prototype.GetCandidates;
/** @type {function(string): void} */
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.Process;
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.prototype.Process;
/** @type {function(Astro.Blog.AstroEdit.SmartInput.ICandidateAction, Event): boolean} */
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.Retreat;
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.prototype.Retreat;
+2 -1
View File
@@ -1,6 +1,7 @@
/** @constructor
* @extends Event
* @param {string} name
* @param {*} data
* @param {*=} data
**/
var _BotanEvent = function (name, data){};
+1 -1
View File
@@ -3,7 +3,7 @@
* @param {string} title
* @param {string|HTMLElement} content
* @param {string} yes
* @param {string=} no
* @param {string|boolean=} no
* @param {function(boolean, ...?): void=} handler
*/
Components.MessageBox = function(title, content, yes, no, handler) {};
@@ -0,0 +1,12 @@
/**
* @constructor
* @implements {Components.Vim.IAction}
* @param {Components.Vim.Cursor} Cursor
*/
Components.Vim.Actions.FIND = function(Cursor){};
/**
* @param {string} p
* @return {RegExp}
*/
Components.Vim.Actions.FIND.Pattern = function(p) {};
@@ -1,23 +1,27 @@
/** @constructor */
Components.Vim.Controls.ActionEvent = function(){};
/**
* @constructor
* @param {Components.Vim.VimArea} sender
* @param {Event|string} e
*/
Components.Vim.ControlActionEvent = function(sender, e){};
/** @type {Components.Vim.VimArea} */
Components.Vim.Controls.ActionEvent.target;
Components.Vim.ControlActionEvent.prototype.target;
/** @type {Components.Vim.Syntax.TokenMatch} */
Components.Vim.Controls.ActionEvent.range;
Components.Vim.ControlActionEvent.prototype.range;
/** @type {Number} */
Components.Vim.Controls.ActionEvent.count;
Components.Vim.ControlActionEvent.prototype.count;
/** @type String */
Components.Vim.Controls.ActionEvent.key;
Components.Vim.ControlActionEvent.prototype.key;
/** @type Boolean */
Components.Vim.Controls.ActionEvent.ModKeys;
Components.Vim.ControlActionEvent.prototype.ModKeys;
/** @type Boolean */
Components.Vim.Controls.ActionEvent.Escape;
Components.Vim.ControlActionEvent.prototype.Escape;
/** @type Boolean */
Components.Vim.Controls.ActionEvent.canceled;
Components.Vim.ControlActionEvent.prototype.canceled;
/** @type Number */
Components.Vim.Controls.ActionEvent.keyCode;
Components.Vim.ControlActionEvent.prototype.keyCode;
/** @type Function */
Components.Vim.Controls.ActionEvent.kMap;
Components.Vim.ControlActionEvent.prototype.kMap;
/** @type Function */
Components.Vim.Controls.ActionEvent.cancel;
Components.Vim.ControlActionEvent.prototype.cancel;
+56 -49
View File
@@ -1,71 +1,78 @@
/** @constructor */
Components.Vim.Cursor = function(){};
/**
* @constructor
* @param {Components.Vim.LineFeeder} feeder
*/
Components.Vim.Cursor = function(feeder){};
/** @type {Components.Vim.VimArea} */
Components.Vim.Cursor.Vim;
Components.Vim.Cursor.prototype.Vim;
/** @type {Components.Vim.LineFeeder} */
Components.Vim.Cursor.feeder;
Components.Vim.Cursor.prototype.feeder;
/** @type {Components.Vim.IAction} */
Components.Vim.Cursor.action;
Components.Vim.Cursor.prototype.action;
/** @type {Components.Vim.State.Recorder} */
Components.Vim.Cursor.rec;
Components.Vim.Cursor.prototype.rec;
/** @type Function */
Components.Vim.Cursor.moveTo;
Components.Vim.Cursor.prototype.moveTo;
/** @type Function */
Components.Vim.Cursor.gotoLine;
Components.Vim.Cursor.prototype.gotoLine;
/** @type Function */
Components.Vim.Cursor.moveX;
Components.Vim.Cursor.prototype.moveX;
/** @type Function */
Components.Vim.Cursor.moveY;
Components.Vim.Cursor.prototype.moveY;
/** @type Function */
Components.Vim.Cursor.lineStart;
Components.Vim.Cursor.prototype.lineStart;
/** @type Function */
Components.Vim.Cursor.lineEnd;
Components.Vim.Cursor.prototype.lineEnd;
/** @type Function */
Components.Vim.Cursor.updatePosition;
Components.Vim.Cursor.prototype.updatePosition;
/** @type Function */
Components.Vim.Cursor.fixTab;
Components.Vim.Cursor.prototype.fixTab;
/** @type Function */
Components.Vim.Cursor.openAction;
Components.Vim.Cursor.prototype.openAction;
/** @type Function */
Components.Vim.Cursor.openRunAction;
Components.Vim.Cursor.prototype.openRunAction;
/** @type Function */
Components.Vim.Cursor.closeAction;
Components.Vim.Cursor.prototype.closeAction;
/** @type Function */
Components.Vim.Cursor.suppressEvent;
Components.Vim.Cursor.prototype.suppressEvent;
/** @type Function */
Components.Vim.Cursor.unsuppressEvent;
Components.Vim.Cursor.prototype.unsuppressEvent;
/** @type {Boolean} */
Components.Vim.Cursor.blink;
/** @type {Boolean} */
Components.Vim.Cursor.pSpace;
/** @type {Array} */
Components.Vim.Cursor.lineBuffers;
/** @type Number */
Components.Vim.Cursor.pX;
/** @type Number */
Components.Vim.Cursor.PStart;
/** @type Number */
Components.Vim.Cursor.PEnd;
/** @type Number */
Components.Vim.Cursor.aX;
/** @type Number */
Components.Vim.Cursor.X;
/** @type Number */
Components.Vim.Cursor.Y;
/** @type Number */
Components.Vim.Cursor.aPos;
/** @type Number */
Components.Vim.Cursor.cols;
/** @type {string} */
Components.Vim.Cursor.message;
Components.Vim.Cursor.prototype.face;
/** @type {boolean} */
Components.Vim.Cursor.prototype.blink;
/** @type {boolean} */
Components.Vim.Cursor.prototype.pSpace;
/** @type {Array} */
Components.Vim.Cursor.prototype.lineBuffers;
/** @type {number} */
Components.Vim.Cursor.prototype.pX;
/** @type {number} */
Components.Vim.Cursor.prototype.PStart;
/** @type {number} */
Components.Vim.Cursor.prototype.PEnd;
/** @type {number} */
Components.Vim.Cursor.prototype.aX;
/** @type {number} */
Components.Vim.Cursor.prototype.X;
/** @type {number} */
Components.Vim.Cursor.prototype.Y;
/** @type {number} */
Components.Vim.Cursor.prototype.aPos;
/** @type {number} */
Components.Vim.Cursor.prototype.cols;
/** @type {string} */
Components.Vim.Cursor.prototype.message;
/** @type Object */
Components.Vim.Cursor.position;
/** @type Number */
Components.Vim.Cursor.position.start;
/** @type Number */
Components.Vim.Cursor.position.end;
/** @type String */
Components.Vim.Cursor.rawLine;
Components.Vim.Cursor.prototype.position;
/** @type {number} */
Components.Vim.Cursor.prototype.position.start;
/** @type {number} */
Components.Vim.Cursor.prototype.position.end;
/** @return {?Components.Vim.LineBuffer} */
Components.Vim.Cursor.prototype.getLine;
/** @type {string} */
Components.Vim.Cursor.prototype.rawLine;
@@ -1,7 +1,10 @@
/** @constructor */
Components.Vim.DateTime = function(){};
/** @type Function */
Components.Vim.DateTime.RelativeTime;
/**
* @param {Date} given
* @return {string}
*/
Components.Vim.DateTime.RelativeTime = function(given){};
/** @type Function */
Components.Vim.DateTime.String;
+11 -7
View File
@@ -1,12 +1,16 @@
/** @constructor */
Components.Vim.IAction = function(){};
/**
* @interface
* @param {Components.Vim.Cursor} cursor
* @param {Components.Vim.ControlActionEvent} evt
*/
Components.Vim.IAction = function(cursor, evt){};
/** @type Function */
Components.Vim.IAction.dispose;
Components.Vim.IAction.prototype.dispose;
/** @type Function */
Components.Vim.IAction.handler;
Components.Vim.IAction.prototype.handler;
/** @type Function */
Components.Vim.IAction.getMessage;
Components.Vim.IAction.prototype.getMessage;
/** @type Boolean */
Components.Vim.IAction.allowMovement;
/** @type {!boolean} */
Components.Vim.IAction.prototype.allowMovement;
@@ -1,42 +1,46 @@
/** @constructor */
Components.Vim.LineBuffer = function(){};
/**
* @constructor
* @param {number} cols
* @param {Components.Vim.LineBuffer=} next
*/
Components.Vim.LineBuffer = function(cols, next){};
/** @type {Components.Vim.LineBuffer} */
Components.Vim.LineBuffer.next;
Components.Vim.LineBuffer.prototype.next;
/** @type {Components.Vim.LineBuffer} */
Components.Vim.LineBuffer.prev;
Components.Vim.LineBuffer.prototype.prev;
/** @type {Components.Vim.LineBuffer} */
Components.Vim.LineBuffer.nextLine;
Components.Vim.LineBuffer.prototype.nextLine;
/** @type {EventDispatcher} */
Components.Vim.LineBuffer.dispatcher;
Components.Vim.LineBuffer.prototype.dispatcher;
/** @type Function */
Components.Vim.LineBuffer.softReset;
Components.Vim.LineBuffer.prototype.softReset;
/** @type Function */
Components.Vim.LineBuffer.pan;
Components.Vim.LineBuffer.prototype.pan;
/** @type Function */
Components.Vim.LineBuffer.render;
Components.Vim.LineBuffer.prototype.render;
/** @type Function */
Components.Vim.LineBuffer.setRender;
Components.Vim.LineBuffer.prototype.setRender;
/** @type Function */
Components.Vim.LineBuffer.init;
Components.Vim.LineBuffer.prototype.init;
/** @type Function */
Components.Vim.LineBuffer.setWrap;
Components.Vim.LineBuffer.prototype.setWrap;
/** @type Array */
Components.Vim.LineBuffer.visualLines;
Components.Vim.LineBuffer.prototype.visualLines;
/** @type Boolean */
Components.Vim.LineBuffer.placeholder;
Components.Vim.LineBuffer.prototype.placeholder;
/** @type Boolean */
Components.Vim.LineBuffer.br;
Components.Vim.LineBuffer.prototype.br;
/** @type Number */
Components.Vim.LineBuffer.cols;
Components.Vim.LineBuffer.prototype.cols;
/** @type Number */
Components.Vim.LineBuffer.lineNum;
Components.Vim.LineBuffer.prototype.lineNum;
/** @type Number */
Components.Vim.LineBuffer.tabWidth;
Components.Vim.LineBuffer.prototype.tabWidth;
/** @type Number */
Components.Vim.LineBuffer.linesOccupied;
Components.Vim.LineBuffer.prototype.linesOccupied;
/** @type String */
Components.Vim.LineBuffer.content;
Components.Vim.LineBuffer.prototype.content;
@@ -1,50 +1,54 @@
/** @constructor */
Components.Vim.LineFeeder = function(){};
/**
* @constructor
* @param {number} range
* @param {number} cols
*/
Components.Vim.LineFeeder = function(range, cols){};
/** @type {Components.Vim.Cursor} */
Components.Vim.LineFeeder.cursor;
Components.Vim.LineFeeder.prototype.cursor;
/** @type {Components.Vim.LineBuffer} */
Components.Vim.LineFeeder.firstBuffer;
Components.Vim.LineFeeder.prototype.firstBuffer;
/** @type {Components.Vim.LineBuffer} */
Components.Vim.LineFeeder.lastBuffer;
Components.Vim.LineFeeder.prototype.lastBuffer;
/** @type EventDispatcher */
Components.Vim.LineFeeder.dispatcher;
Components.Vim.LineFeeder.prototype.dispatcher;
/** @type Function */
Components.Vim.LineFeeder.softReset;
Components.Vim.LineFeeder.prototype.softReset;
/** @type Function */
Components.Vim.LineFeeder.pan;
Components.Vim.LineFeeder.prototype.pan;
/** @type Function */
Components.Vim.LineFeeder.render;
Components.Vim.LineFeeder.prototype.render;
/** @type Function */
Components.Vim.LineFeeder.setRender;
Components.Vim.LineFeeder.prototype.setRender;
/** @type Function */
Components.Vim.LineFeeder.init;
Components.Vim.LineFeeder.prototype.init;
/** @type Function */
Components.Vim.LineFeeder.setWrap;
Components.Vim.LineFeeder.prototype.setWrap;
/** @type {Array} */
Components.Vim.LineFeeder.lineBuffers;
/** @type Boolean */
Components.Vim.LineFeeder.EOF;
/** @type Boolean */
Components.Vim.LineFeeder.wrap;
/** @type Number */
Components.Vim.LineFeeder.panX;
/** @type Number */
Components.Vim.LineFeeder.panY;
/** @type Number */
Components.Vim.LineFeeder.moreAt;
/** @type Number */
Components.Vim.LineFeeder.linesTotal;
/** @type Number */
Components.Vim.LineFeeder.linesOccupied;
/** @type String */
Components.Vim.LineFeeder.docPos;
/** @type String */
Components.Vim.LineFeeder.line;
/** @type String */
Components.Vim.LineFeeder.lineStat;
Components.Vim.LineFeeder.prototype.lineBuffers;
/** @type {boolean} */
Components.Vim.LineFeeder.prototype.EOF;
/** @type {boolean} */
Components.Vim.LineFeeder.prototype.wrap;
/** @type {number} */
Components.Vim.LineFeeder.prototype.panX;
/** @type {number} */
Components.Vim.LineFeeder.prototype.panY;
/** @type {number} */
Components.Vim.LineFeeder.prototype.moreAt;
/** @type {number} */
Components.Vim.LineFeeder.prototype.linesTotal;
/** @type {number} */
Components.Vim.LineFeeder.prototype.linesOccupied;
/** @type {string} */
Components.Vim.LineFeeder.content;
Components.Vim.LineFeeder.prototype.docPos;
/** @type {function(number): string} */
Components.Vim.LineFeeder.prototype.line;
/** @type {string} */
Components.Vim.LineFeeder.prototype.lineStat;
/** @type {string} */
Components.Vim.LineFeeder.prototype.content;
@@ -1,9 +1,14 @@
/** @constructor */
Components.Vim.State.History = function(){};
/**
* @constructor
* @param {string} zone
*/
Components.Vim.State.History = function(zone){};
/** @type Function */
Components.Vim.State.History.push;
Components.Vim.State.History.prototype.push;
/** @type Function */
Components.Vim.State.History.prev;
Components.Vim.State.History.prototype.prev;
/** @type Function */
Components.Vim.State.History.next;
Components.Vim.State.History.prototype.next;
/** @type Function */
Components.Vim.State.History.prototype.reset;
@@ -2,9 +2,9 @@
Components.Vim.State.Marks = function(){};
/** @type Function */
Components.Vim.State.Marks.set;
Components.Vim.State.Marks.prototype.set;
/** @type Function */
Components.Vim.State.Marks.get;
Components.Vim.State.Marks.prototype.get;
/** @type String */
/** @type {string} */
Components.Vim.State.Marks.Keys;
@@ -2,13 +2,13 @@
Components.Vim.State.Recorder = function(){};
/** @type Function */
Components.Vim.State.Recorder.undo;
Components.Vim.State.Recorder.prototype.undo;
/** @type Function */
Components.Vim.State.Recorder.redo;
Components.Vim.State.Recorder.prototype.redo;
/** @type Function */
Components.Vim.State.Recorder.record;
Components.Vim.State.Recorder.prototype.record;
/** @type Function */
Components.Vim.State.Recorder.save;
Components.Vim.State.Recorder.prototype.save;
/** @type Boolean */
Components.Vim.State.Recorder.changed;
Components.Vim.State.Recorder.prototype.changed;
@@ -2,12 +2,16 @@
Components.Vim.State.Registers = function(){};
/** @type Function */
Components.Vim.State.Registers.change;
Components.Vim.State.Registers.prototype.change = function() {};
/** @type Function */
Components.Vim.State.Registers.yank;
Components.Vim.State.Registers.prototype.yank = function() {};
/** @type Function */
Components.Vim.State.Registers.prototype.get = function() {};
/** @type Function */
Components.Vim.State.Registers.prototype.select = function() {};
/** @constructor */
Components.Vim.State.Register = function(){};
/** @type Boolean */
Components.Vim.State.Register.newLine;
Components.Vim.State.Register.prototype.newLine;
@@ -2,8 +2,8 @@
Components.Vim.State.Stack = function(){};
/** @type Function */
Components.Vim.State.Stack.play;
Components.Vim.State.Stack.prototype.play;
/** @type Function */
Components.Vim.State.Stack.store;
Components.Vim.State.Stack.prototype.store;
/** @type Function */
Components.Vim.State.Stack.time;
Components.Vim.State.Stack.prototype.time;
@@ -0,0 +1,9 @@
/**
* @constructor
* @param {Components.Vim.Cursor} cursor
* @param {number=} start
*/
Components.Vim.State.Stator = function(cursor, start){};
/** @type Function */
Components.Vim.State.Stator.prototype.save;
@@ -1,9 +1,12 @@
/** @constructor */
Components.Vim.StatusBar = function(){};
/**
* @constructor
* @param {number} cols
*/
Components.Vim.StatusBar = function(cols){};
/** @type Function */
Components.Vim.StatusBar.stamp;
Components.Vim.StatusBar.prototype.stamp;
/** @type Function */
Components.Vim.StatusBar.override;
Components.Vim.StatusBar.prototype.override;
/** @type String */
Components.Vim.StatusBar.statusText;
Components.Vim.StatusBar.prototype.statusText;
@@ -1,15 +1,18 @@
/** @constructor */
Components.Vim.Syntax.Analyzer = function(){};
/**
* @constructor
* @param {Components.Vim.LineFeeder} feeder
*/
Components.Vim.Syntax.Analyzer = function(feeder){};
/** @type Function */
Components.Vim.Syntax.Analyzer.bracketAt;
Components.Vim.Syntax.Analyzer.prototype.bracketAt;
/** @type Function */
Components.Vim.Syntax.Analyzer.bracketIn;
Components.Vim.Syntax.Analyzer.prototype.bracketIn;
/** @type Function */
Components.Vim.Syntax.Analyzer.quoteIn;
Components.Vim.Syntax.Analyzer.prototype.quoteIn;
/** @type Function */
Components.Vim.Syntax.Analyzer.wordAt;
Components.Vim.Syntax.Analyzer.prototype.wordAt;
/** @type Function */
Components.Vim.Syntax.Analyzer.quoteAt;
Components.Vim.Syntax.Analyzer.prototype.quoteAt;
/** @type Function */
Components.Vim.Syntax.Analyzer.reset;
Components.Vim.Syntax.Analyzer.prototype.reset;
@@ -2,13 +2,13 @@
Components.Vim.Syntax.TokenMatch = function(){};
/** @type {Components.Vim.Syntax.TokenMatch} */
Components.Vim.Syntax.TokenMatch.parent;
Components.Vim.Syntax.TokenMatch.prototype.parent;
/** @type Number */
Components.Vim.Syntax.TokenMatch.open;
Components.Vim.Syntax.TokenMatch.prototype.open;
/** @type Number */
Components.Vim.Syntax.TokenMatch.close;
Components.Vim.Syntax.TokenMatch.prototype.close;
/** @type Number */
Components.Vim.Syntax.TokenMatch.level;
Components.Vim.Syntax.TokenMatch.prototype.level;
/** @type Number */
Components.Vim.Syntax.TokenMatch.selected;
Components.Vim.Syntax.TokenMatch.prototype.selected;
@@ -1,5 +1,9 @@
/** @constructor */
Components.Vim.Syntax.Word = function(){};
/**
* @constructor
* @param {string} c
*/
Components.Vim.Syntax.Word = function(c){};
/** @type Function */
Components.Vim.Syntax.Word.test;
Components.Vim.Syntax.Word.prototype.test;
+16 -16
View File
@@ -6,31 +6,31 @@
Components.Vim.VimArea = function(stage, detectScreenSize){};
/** @type {Components.Vim.LineFeeder} */
Components.Vim.VimArea.contentFeeder;
Components.Vim.VimArea.prototype.contentFeeder;
/** @type {Components.Vim.Syntax.Analyzer} */
Components.Vim.VimArea.contentAnalyzer;
Components.Vim.VimArea.prototype.contentAnalyzer;
/** @type {Components.Vim.LineFeeder} */
Components.Vim.VimArea.statusFeeder;
Components.Vim.VimArea.prototype.statusFeeder;
/** @type {Components.Vim.StatusBar} */
Components.Vim.VimArea.statusBar;
Components.Vim.VimArea.prototype.statusBar;
/** @type {Components.Vim.State.Registers} */
Components.Vim.VimArea.registers;
Components.Vim.VimArea.prototype.registers;
/** @type {Components.Vim.State.Marks} */
Components.Vim.VimArea.marks;
Components.Vim.VimArea.prototype.marks;
/** @type Function */
Components.Vim.VimArea.demo;
Components.Vim.VimArea.prototype.demo;
/** @type Function */
Components.Vim.VimArea.display;
Components.Vim.VimArea.prototype.display;
/** @type Number */
Components.Vim.VimArea.index;
/** @type Number */
Components.Vim.VimArea.rows;
/** @type Number */
Components.Vim.VimArea.cols;
/** @type {number} */
Components.Vim.VimArea.prototype.index;
/** @type {number} */
Components.Vim.VimArea.prototype.rows;
/** @type {number} */
Components.Vim.VimArea.prototype.cols;
/** @type Array */
Components.Vim.VimArea.Instances;
Components.Vim.VimArea.prototype.Instances;
/** @type Function */
Components.Vim.VimArea.dispose;
Components.Vim.VimArea.prototype.dispose;
@@ -25,5 +25,7 @@ Dandelion.IDOMElement.prototype.contains = function() {};
Dandelion.IDOMElement.prototype.aKeys = function() {};
/** @type {HTMLElement} */
Dandelion.IDOMElement.prototype.element;
/** @type {CSSStyleDeclaration} */
Dandelion.IDOMElement.prototype.style;
/** @type {function(): void} */
Dandelion.IDOMElement.prototype.reverseChild = function() {};
@@ -0,0 +1,12 @@
/**
* @constructor
* @param {string} sapi
* @param {string} mode
*/
System.Net.ClassLoader = function (sapi, mode){};
/**
* @param {string|Array<string>} classes
* @param {function(string): void} handler
*/
System.Net.ClassLoader.prototype.load = function (classes, handler){};