forked from Botanical/BotanJS
Migrate old externs 5/x
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
/** @param {Astro.Blog.AstroEdit.Article} article */
|
||||
var Draft = function ( article, draftsUri )
|
||||
{
|
||||
/** @type {Astro.Blog.AstroEdit.Article} */
|
||||
/** @type {typeof Astro.Blog.AstroEdit.Article} */
|
||||
var Article = ns[ NS_INVOKE ]( "Article" );
|
||||
|
||||
if ( !( article instanceof Article ) ) return;
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
Flag.prototype.getSetData = function () { };
|
||||
Flag.prototype.getData = function () { };
|
||||
Flag.prototype.setForView = function ( flagList ) { };
|
||||
|
||||
ns[ NS_EXPORT ]( EX_CLASS, "Flag", Flag );
|
||||
|
||||
@@ -762,6 +762,8 @@
|
||||
Dand.id( "asl_refresh", true ).addEventListener( "click", function( e ) { refreshCanvas( 0 ); } );
|
||||
new IDOMObject( document ).addEventListeners([ dKeyUp, dKeyDown ]);
|
||||
stage.addEventListener(showLibrary);
|
||||
|
||||
this.stage = stage;
|
||||
};
|
||||
|
||||
ns[ NS_EXPORT ]( EX_CLASS, "SiteLibrary", SiteLibrary );
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
this.title = title;
|
||||
this.desc = desc;
|
||||
this.__cands = [];
|
||||
/** @type Array<Astro.Blog.AstroEdit.SmartInput.Definition> */
|
||||
this.__defs = defs || {};
|
||||
this.Empty = !defs;
|
||||
};
|
||||
@@ -79,7 +80,6 @@
|
||||
|
||||
for( var i in this.__defs )
|
||||
{
|
||||
/** @param {Astro.Blog.AstroEdit.SmartInput.Definition} */
|
||||
var c = this.__defs[i];
|
||||
this.__cands.push( Dand.wrapc( "cn", [ i, Dand.wrapc( "desc", c.desc ) ], new DataKey( "key", i ) ) );
|
||||
}
|
||||
|
||||
@@ -11,19 +11,19 @@
|
||||
var Bootstrap = __import( "Astro.Bootstrap" );
|
||||
/** @type {Astro.Blog.Config} */
|
||||
var Config = __import( "Astro.Blog.Config" );
|
||||
/** @type {Astro.Blog.AstroEdit.Article} */
|
||||
/** @type {typeof Astro.Blog.AstroEdit.Article} */
|
||||
var Article = __import( "Astro.Blog.AstroEdit.Article" );
|
||||
/** @type {Astro.Blog.AstroEdit.Draft} */
|
||||
/** @type {typeof Astro.Blog.AstroEdit.Draft} */
|
||||
var Draft = __import( "Astro.Blog.AstroEdit.Draft" );
|
||||
/** @type {Astro.Blog.AstroEdit.Flag} */
|
||||
/** @type {typeof Astro.Blog.AstroEdit.Flag} */
|
||||
var Flag = __import( "Astro.Blog.AstroEdit.Flag" );
|
||||
/** @type {Astro.Blog.AstroEdit.Visualizer} */
|
||||
/** @type {typeof Astro.Blog.AstroEdit.Visualizer} */
|
||||
var Visualizer = __import( "Astro.Blog.AstroEdit.Visualizer" );
|
||||
/** @type {Astro.Blog.AstroEdit.Uploader} */
|
||||
/** @type {typeof Astro.Blog.AstroEdit.Uploader} */
|
||||
var Uploader = __import( "Astro.Blog.AstroEdit.Uploader" );
|
||||
/** @type {Astro.Blog.AstroEdit.SiteLibrary} */
|
||||
/** @type {typeof Astro.Blog.AstroEdit.SiteLibrary} */
|
||||
var SiteLibrary = __import( "Astro.Blog.AstroEdit.SiteLibrary" );
|
||||
/** @type {Components.Vim.VimArea} */
|
||||
/** @type {typeof Components.Vim.VimArea} */
|
||||
var VimArea = __import( "Components.Vim.VimArea" );
|
||||
|
||||
// calls the smart bar
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
/* stage @param {function(...?): Dandelion.IDOMElement} */
|
||||
var VimArea = function( stage, detectScreenSize )
|
||||
{
|
||||
if( !stage ) throw new Error( "Invalid argument" );
|
||||
|
||||
@@ -27,7 +27,7 @@ var __const = __static_method;
|
||||
|
||||
/*{{{ BotanEvent & EventDispatcher */
|
||||
|
||||
/** @type {typeof BotanEvent} */
|
||||
/** @type {typeof _BotanEvent} */
|
||||
var BotanEvent;
|
||||
|
||||
BotanEvent = function( name, data )
|
||||
@@ -70,7 +70,6 @@ BotanEvent = function( name, data )
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {EventTarget}
|
||||
*/
|
||||
var EventDispatcher = function() {
|
||||
var events = {};
|
||||
@@ -245,7 +244,6 @@ var TGR_IMPORT = 0;
|
||||
// some core methods
|
||||
var sGarden = window["BotanJS"];
|
||||
|
||||
/** @type {BotanJS} */
|
||||
var BotanJS = null;
|
||||
var __namespace = null;
|
||||
var __import = null;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
/** @constructor */
|
||||
Astro.Blog.AstroEdit.Article = function(){};
|
||||
/** @constructor
|
||||
* @params {string} set_article_uri
|
||||
* @params {Array<Astro.Blog.AstroEdit.Flag>} plugins
|
||||
*/
|
||||
Astro.Blog.AstroEdit.Article = function(set_article_uri, plugins){};
|
||||
|
||||
/** @type {Function} */
|
||||
Astro.Blog.AstroEdit.Article.saveOrBackup;
|
||||
/** @type {Function} */
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Astro.Blog.AstroEdit.Article} article
|
||||
* @param {string} url
|
||||
*/
|
||||
Astro.Blog.AstroEdit.Draft = function(article, url) {};
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Astro.Blog.AstroEdit.IPlugin}
|
||||
* @param {string} id
|
||||
* @param {string} target
|
||||
* @param {!_AstConf_.AstroEditFlags} flagConf
|
||||
*/
|
||||
Astro.Blog.AstroEdit.Flag = function(id, target, flagConf) {};
|
||||
@@ -1,8 +1,18 @@
|
||||
/** @constructor Plugin Interface */
|
||||
Astro.Blog.AstroEdit.IPlugin = function(){};
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
Astro.Blog.AstroEdit.IPlugin = function() {};
|
||||
|
||||
/** @type {string} */
|
||||
Astro.Blog.AstroEdit.IPlugin.id;
|
||||
/** @type {Function} */
|
||||
Astro.Blog.AstroEdit.IPlugin.setFromData;
|
||||
/** @type {Function} */
|
||||
Astro.Blog.AstroEdit.IPlugin.getData;
|
||||
Astro.Blog.AstroEdit.IPlugin.prototype.id;
|
||||
|
||||
/**
|
||||
* @param {*} data
|
||||
* @return {void}
|
||||
*/
|
||||
Astro.Blog.AstroEdit.IPlugin.prototype.setForView = function(data) {};
|
||||
|
||||
/**
|
||||
* @return {*}
|
||||
*/
|
||||
Astro.Blog.AstroEdit.IPlugin.prototype.getData = function() {};
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} base_path
|
||||
* @param {string} get_uri
|
||||
* @param {string} set_uri
|
||||
*/
|
||||
Astro.Blog.AstroEdit.SiteLibrary = function(base_path, get_uri, set_uri) {};
|
||||
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} set_file_uri
|
||||
*/
|
||||
Astro.Blog.AstroEdit.Uploader = function(set_file_uri) {};
|
||||
@@ -1,5 +1,9 @@
|
||||
/** @constructor */
|
||||
Astro.Blog.AstroEdit.Visualizer = function(){};
|
||||
/** @constructor
|
||||
* @param {Astro.Blog.AstroEdit.Article} e_document
|
||||
* @param {HTMLElement|Dandelion.IDOMElement} controls
|
||||
* @param {string} service_uri
|
||||
*/
|
||||
Astro.Blog.AstroEdit.Visualizer = function(e_document, controls, service_uri){};
|
||||
/** @type {Function} */
|
||||
Astro.Blog.AstroEdit.Visualizer.setContentDiv;
|
||||
/** @type {Function} */
|
||||
|
||||
@@ -2,18 +2,22 @@
|
||||
* @param {string} name
|
||||
* @param {*} data
|
||||
**/
|
||||
var BotanEvent = function (name, data){};
|
||||
var _BotanEvent = function (name, data){};
|
||||
|
||||
/** @type {function(): void} */
|
||||
_BotanEvent.propagate = function() {};
|
||||
|
||||
/** @type {function(): void} */
|
||||
_BotanEvent.stopPropagating = function() {};
|
||||
|
||||
/** @type {function(): boolean} */
|
||||
_BotanEvent.propagating = function() {};
|
||||
|
||||
/** @type {*} */
|
||||
BotanEvent.data;
|
||||
_BotanEvent.prototype.data;
|
||||
|
||||
/** @type {Function} */
|
||||
BotanEvent.propagate = function() {};
|
||||
/** @type {Function} */
|
||||
BotanEvent.stopPropagating = function() {};
|
||||
/** @type {function(*): void} */
|
||||
_BotanEvent.prototype.setTarget;
|
||||
|
||||
/** @type {Boolean} */
|
||||
BotanEvent.propagating;
|
||||
|
||||
/** @type {Function} */
|
||||
BotanEvent.setTarget;
|
||||
/** @type {string} */
|
||||
_BotanEvent.prototype.type;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
/** @constructor
|
||||
* @extends {EventDispatcher}
|
||||
* @param {Element} stage
|
||||
* @param {boolean} detectScreenSize
|
||||
*/
|
||||
Components.Vim.VimArea = function(){};
|
||||
Components.Vim.VimArea = function(stage, detectScreenSize){};
|
||||
|
||||
/** @type {Components.Vim.LineFeeder} */
|
||||
Components.Vim.VimArea.contentFeeder;
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
/** @constructor */
|
||||
System.utils = function (){}
|
||||
|
||||
/** @type {Function} */
|
||||
System.utils.objGetProp;
|
||||
/** @type {Function} */
|
||||
System.utils.objSearch;
|
||||
/** @type {Function} */
|
||||
System.utils.objMap;
|
||||
/** @type {Function} */
|
||||
System.utils.siteProto;
|
||||
/**
|
||||
* @param {*} obj
|
||||
* @param {string} prop
|
||||
* @param {string} type
|
||||
*/
|
||||
System.utils.prototype.objGetProp = function(obj, prop, type) {};
|
||||
|
||||
/**
|
||||
* @param {*} obj
|
||||
* @param {function(*): boolean} cond
|
||||
* @param {string} prop
|
||||
*/
|
||||
System.utils.prototype.objSearch = function(obj, cond, prop) {};
|
||||
|
||||
/**
|
||||
* @param {*} obj
|
||||
* @param {function(*): *} callback
|
||||
*/
|
||||
System.utils.prototype.objMap = function(obj, callback) {};
|
||||
|
||||
/** @type {function(string): string} */
|
||||
System.utils.prototype.siteProto = function(path){};
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
/**
|
||||
* @typedef {{
|
||||
* article_id: string,
|
||||
* paths: !_AstConf_.AstroEdit.Paths,
|
||||
* tags: !Object<string, *>,
|
||||
* sections: !Object<string, *>,
|
||||
* flags: !_AstConf_.AstroEdit.Flags
|
||||
* URICount: string,
|
||||
* URISet: string
|
||||
* }}
|
||||
*/
|
||||
_AstConf_.AstroEdit;
|
||||
_AstConf_.AstroEditFlags;
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
@@ -16,15 +13,17 @@ _AstConf_.AstroEdit;
|
||||
* list_articles: string,
|
||||
* get_drafts: string,
|
||||
* get_files: string,
|
||||
* set_file: string
|
||||
* set_file: string,
|
||||
* tags: !_AstConf_.AstroEditFlags,
|
||||
* sections: !_AstConf_.AstroEditFlags
|
||||
* }}
|
||||
*/
|
||||
_AstConf_.AstroEdit.Paths;
|
||||
_AstConf_.AstroEditPaths;
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* URICount: string,
|
||||
* URISet: string
|
||||
* article_id: string,
|
||||
* paths: !_AstConf_.AstroEditPaths
|
||||
* }}
|
||||
*/
|
||||
_AstConf_.AstroEdit.Flags;
|
||||
_AstConf_.AstroEdit;
|
||||
|
||||
Reference in New Issue
Block a user