- Docs (JSDoc): Further on preferring void

This commit is contained in:
Brett Zamir
2019-04-16 08:59:16 +08:00
parent 894fed3e80
commit d84f39cb3f
62 changed files with 576 additions and 575 deletions

View File

@@ -20,7 +20,7 @@ function toAbsoluteURL (url) {
* Add any of the whitelisted attributes to the script tag.
* @param {HTMLScriptElement} script
* @param {PlainObject.<string, string>} atts
* @returns {undefined}
* @returns {void}
*/
function addScriptAtts (script, atts) {
['id', 'class', 'type'].forEach((prop) => {
@@ -81,7 +81,7 @@ export function importScript (url, atts = {}) {
const script = document.createElement('script');
/**
*
* @returns {undefined}
* @returns {void}
*/
function scriptOnError () {
reject(new Error(`Failed to import: ${url}`));
@@ -89,7 +89,7 @@ export function importScript (url, atts = {}) {
}
/**
*
* @returns {undefined}
* @returns {void}
*/
function scriptOnLoad () {
resolve();
@@ -131,7 +131,7 @@ export function importModule (url, atts = {}, {returnDefault = false} = {}) {
const script = document.createElement('script');
/**
*
* @returns {undefined}
* @returns {void}
*/
function scriptOnError () {
reject(new Error(`Failed to import: ${url}`));
@@ -139,7 +139,7 @@ export function importModule (url, atts = {}, {returnDefault = false} = {}) {
}
/**
*
* @returns {undefined}
* @returns {void}
*/
function scriptOnLoad () {
resolve(window[vector]);