Refactor jsdoc types (#16)

* WIP

* Fix type 1

* Missing types info

* Some fixes

* Several types refactoring and fixes

* WIP

* Fix grammar
This commit is contained in:
barsdeveloper
2023-09-22 22:56:33 +02:00
committed by GitHub
parent 78c62ee59a
commit fdd86ce5de
78 changed files with 413 additions and 1010 deletions

View File

@@ -1,16 +1,11 @@
/**
* @typedef {import("./IElement.js").default} IElement
* @typedef {new (...args) => IElement} ElementConstructor
*/
export default class ElementFactory {
/** @type {Map<String, ElementConstructor>} */
/** @type {Map<String, AnyConstructor<IElement>>} */
static #elementConstructors = new Map()
/**
* @param {String} tagName
* @param {ElementConstructor} entityConstructor
* @param {AnyConstructor<IElement>} entityConstructor
*/
static registerElement(tagName, entityConstructor) {
ElementFactory.#elementConstructors.set(tagName, entityConstructor)