mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 09:42:21 -04:00
Add typedef for Module, use it in other jsdocs
This commit is contained in:
parent
0674c0aff6
commit
522f7644a3
3 changed files with 11 additions and 10 deletions
15
js/module.js
15
js/module.js
|
@ -2,9 +2,11 @@
|
|||
|
||||
/* Magic Mirror
|
||||
* Module Blueprint.
|
||||
* @typedef {Object} Module
|
||||
*
|
||||
* By Michael Teeuw https://michaelteeuw.nl
|
||||
* MIT Licensed.
|
||||
*
|
||||
*/
|
||||
var Module = Class.extend({
|
||||
/*********************************************************
|
||||
|
@ -45,9 +47,8 @@ var Module = Class.extend({
|
|||
|
||||
/**
|
||||
* Returns a list of scripts the module requires to be loaded.
|
||||
* return Array<String> -
|
||||
*
|
||||
* @returns {*[]} An array with filenames.
|
||||
* @returns {string[]} An array with filenames.
|
||||
*/
|
||||
getScripts: function () {
|
||||
return [];
|
||||
|
@ -56,7 +57,7 @@ var Module = Class.extend({
|
|||
/**
|
||||
* Returns a list of stylesheets the module requires to be loaded.
|
||||
*
|
||||
* @returns {*[]} An array with filenames.
|
||||
* @returns {string[]} An array with filenames.
|
||||
*/
|
||||
getStyles: function () {
|
||||
return [];
|
||||
|
@ -146,7 +147,7 @@ var Module = Class.extend({
|
|||
*
|
||||
* @param {string} notification The identifier of the notification.
|
||||
* @param {*} payload The payload of the notification.
|
||||
* @param {object} sender The module that sent the notification.
|
||||
* @param {Module} sender The module that sent the notification.
|
||||
*/
|
||||
notificationReceived: function (notification, payload, sender) {
|
||||
if (sender) {
|
||||
|
@ -212,7 +213,7 @@ var Module = Class.extend({
|
|||
/**
|
||||
* Set the module data.
|
||||
*
|
||||
* @param {object} data The module data
|
||||
* @param {Module} data The module data
|
||||
*/
|
||||
setData: function (data) {
|
||||
this.data = data;
|
||||
|
@ -388,7 +389,7 @@ var Module = Class.extend({
|
|||
*
|
||||
* @param {number} speed The speed of the hide animation.
|
||||
* @param {Function} callback Called when the animation is done.
|
||||
* @param {object} options Optional settings for the hide method.
|
||||
* @param {object} [options] Optional settings for the hide method.
|
||||
*/
|
||||
hide: function (speed, callback, options) {
|
||||
if (typeof callback === "object") {
|
||||
|
@ -416,7 +417,7 @@ var Module = Class.extend({
|
|||
*
|
||||
* @param {number} speed The speed of the show animation.
|
||||
* @param {Function} callback Called when the animation is done.
|
||||
* @param {object} options Optional settings for the show method.
|
||||
* @param {object} [options] Optional settings for the show method.
|
||||
*/
|
||||
show: function (speed, callback, options) {
|
||||
if (typeof callback === "object") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue