theoretically complete

master
Valerie 2021-06-09 21:31:17 -04:00
parent 2eb7268903
commit 7d3c4196ab
4 changed files with 14 additions and 13 deletions

View File

@ -2,14 +2,17 @@
"name": "frigid",
"version": "1.0.0",
"main": "out/index.js",
"types": "out/index.d.ts",
"license": "MIT",
"type": "module",
"repository": "",
"repository": "https://github.com/marcus13345/frigid.git",
"devDependencies": {
"@types/node": "^15.12.2",
"typescript": "^4.3.2",
"@types/node": "^15.12.2"
"yarn": "^1.22.10"
},
"scripts": {
"prepublish": "yarn build",
"build": "tsc"
}
}

View File

@ -7,6 +7,9 @@ export default class Serializable {
// things that need to be stored only in cold
// storage are keyed with a special prefix
// its namesapce pollution, eventually the
// format should be a bit more complex, to
// avoid this but... simplicity for now...
static CLASS_REFERENCE = '$$CLASS_NAME';
// things that need to be stored only at runtime
@ -14,16 +17,6 @@ export default class Serializable {
// user code.
static PERSIST_LOCATION = Symbol('PERSIST_LOCATION');
start() {}
// toUbj() {
// return Ubjson.encode(this.toSerializableObject());
// }
// static fromUbj(buffer) {
// return this.fromSerializableObject(Ubjson.decode(buffer));
// }
toJson() {
return JSON.stringify(this.toSerializableObject(), null, 2);
}

View File

@ -3,7 +3,8 @@
"target": "ES2020",
"module": "ES2020",
"moduleResolution": "Node",
"outDir": "out"
"outDir": "out",
"declaration": true
},
"include": [
"src/**/*.ts"

View File

@ -9,3 +9,7 @@
typescript@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
yarn@^1.22.10:
version "1.22.10"
resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.22.10.tgz#c99daa06257c80f8fa2c3f1490724e394c26b18c"