mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-07 08:07:29 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user