Files
ueblueprint/js/entity/ComputedType.js
2023-04-15 15:29:21 +02:00

17 lines
278 B
JavaScript

/** @typedef {import("./IEntity.js").default} IEntity */
export default class ComputedType {
#f
/** @param {Function} f */
constructor(f) {
this.#f = f
}
/** @param {IEntity} entity */
compute(entity) {
return this.#f(entity)
}
}