mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-17 11:44:44 +08:00
Entities cleanup, Primitive concept introduced
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
import Utility from "../Utility"
|
||||
|
||||
export default class TypeInitialization {
|
||||
constructor(value, showDefault = true, type = Utility.getType(value)) {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {typeof Object} type
|
||||
* @param {boolean} showDefault
|
||||
* @param {*} value
|
||||
*/
|
||||
constructor(type, showDefault = true, value = undefined) {
|
||||
if (value === undefined) {
|
||||
value = Utility.sanitize(new type())
|
||||
}
|
||||
this.value = value
|
||||
this.showDefault = showDefault
|
||||
this.type = type
|
||||
|
||||
Reference in New Issue
Block a user