feat(serialize, parse): Number, String, Array, ConstString, ConstArray

This commit is contained in:
2025-08-03 10:54:21 +03:00
commit 26eb3b9068
15 changed files with 2969 additions and 0 deletions

18
src/type.js Normal file
View File

@ -0,0 +1,18 @@
export class Type {
constructor (func, obj) {
this._func = func
Object.assign(this, obj)
}
toString() {
return this._func.name
}
}
export function ConstString(size) {
return new Type(ConstString, { _size: size })
}
export function ConstArray(size) {
return new Type(ConstArray, { _size: size })
}