Various fixes

This commit is contained in:
barsdeveloper
2022-03-28 23:04:24 +02:00
parent ca5948792a
commit a0eeca11d1
73 changed files with 446 additions and 125 deletions

View File

@@ -1,3 +1,5 @@
// @ts-check
/**
* @typedef {import("../Blueprint").default} Blueprint
* @typedef {import("../entity/IEntity").default} IEntity
@@ -53,12 +55,12 @@ export default class IElement extends HTMLElement {
}
/**
* @template {} T
* @param {new () => T} type
* @template {IContext} T
* @param {new (...args: any[]) => T} type
* @returns {T}
*/
getInputObject(type) {
return this.inputObjects.find(object => object.constructor == type)
return /** @type {T} */ (this.inputObjects.find(object => object.constructor == type))
}
// Subclasses will want to override