mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-13 16:44:49 +08:00
19 lines
453 B
JavaScript
19 lines
453 B
JavaScript
import Utility from "../Utility"
|
|
|
|
export default class TypeInitialization {
|
|
|
|
/**
|
|
*
|
|
* @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
|
|
}
|
|
} |