Grammar refactoring WIP

This commit is contained in:
barsdeveloper
2021-10-22 00:01:24 +02:00
parent 9caea42101
commit 051eed061d
21 changed files with 968 additions and 354 deletions

View File

@@ -0,0 +1,12 @@
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
}
}