diff --git a/main.js b/main.js index ba72013..7e237a8 100644 --- a/main.js +++ b/main.js @@ -70,7 +70,7 @@ export class Stear{ * Access an Element from the Frame Store * * @param {string} id - * @returns + * @returns {SFrame} */ getElement (id) { return this.g(id); @@ -86,7 +86,7 @@ export class Stear{ * @param {SFrame} elem * @param {*} args * @param {number} layer - * @returns + * @returns {callPromise} */ async call (elem, args, layer = 1){ return await elem.call(this, args, this.#frames, layer); @@ -99,7 +99,7 @@ export class Stear{ * @param {*} args * @param {HTMLElement} renderParent * @param {number} layer - * @returns + * @returns {callPromise} */ include(elem, args, renderParent, layer = 1){ return elem.call(this, args, this.#frames, layer, renderParent); @@ -109,11 +109,11 @@ export class Stear{ * Rernder everthing. * * @param {*} arg - * @returns + * @returns {Promise} */ rerenderGlobal(arg){ - if(this.#frames.length == 0)return; return new Promise((res,rej)=>{ + if(this.#frames.length == 0)return void res(); let running = this.#frames.length; for (let i = 0; i < this.#frames.length; i++) { const element = this.#frames[i]; @@ -498,7 +498,7 @@ export class class_ { * Generate a new Stear render Node. * * @param {renderNodeSettings} settings - * @param {(LanguagePoolString|string|class_)[]} childs + * @param {Array} childs * @param {boolean} doBuild */ constructor(settings,childs,doBuild = true){ @@ -529,7 +529,7 @@ export class class_ { } /** - * @param {(LanguagePoolString|string|class_)[]} childs + * @param {Array} childs */ set childs(childs){ if (!this.#doBuild) return; @@ -626,8 +626,8 @@ export class class_ { /** * * @param {renderNodeSettings} [settings] - * @param {(LanguagePoolString|string|class_)[]} [childs] - * @returns + * @param {Array} [childs] + * @returns {class_} */ export const _ = (settings = {}, childs = []) => new class_(settings, Array.isArray(childs) ? childs : [childs]); export const s = (type,settings,...childs)=>{ @@ -679,7 +679,7 @@ class includeFrame{ * Trigger onParentRender event * * @param {*} settings - * @returns + * @returns {HTMLElement} */ render(settings={}){ this.#elem.settings = settings;