Refactoring and bugfixing

This commit is contained in:
barsdeveloper
2021-10-24 00:17:16 +02:00
parent a34be2351e
commit f80c9f8dc1
16 changed files with 274 additions and 1396 deletions

View File

@@ -2,9 +2,6 @@ import Utility from "../Utility"
export default class TypeInitialization {
constructor(value, showDefault = true, type = Utility.getType(value)) {
if (type.prototype.constructor.name != value.constructor.name) {
throw new Error("Default value expected to be of the same type.")
}
this.value = value
this.showDefault = showDefault
this.type = type