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", "name": "frigid",
"version": "1.0.0", "version": "1.0.0",
"main": "out/index.js", "main": "out/index.js",
"types": "out/index.d.ts",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
"repository": "", "repository": "https://github.com/marcus13345/frigid.git",
"devDependencies": { "devDependencies": {
"@types/node": "^15.12.2",
"typescript": "^4.3.2", "typescript": "^4.3.2",
"@types/node": "^15.12.2" "yarn": "^1.22.10"
}, },
"scripts": { "scripts": {
"prepublish": "yarn build",
"build": "tsc" "build": "tsc"
} }
} }

View File

@ -7,6 +7,9 @@ export default class Serializable {
// things that need to be stored only in cold // things that need to be stored only in cold
// storage are keyed with a special prefix // 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'; static CLASS_REFERENCE = '$$CLASS_NAME';
// things that need to be stored only at runtime // things that need to be stored only at runtime
@ -14,16 +17,6 @@ export default class Serializable {
// user code. // user code.
static PERSIST_LOCATION = Symbol('PERSIST_LOCATION'); static PERSIST_LOCATION = Symbol('PERSIST_LOCATION');
start() {}
// toUbj() {
// return Ubjson.encode(this.toSerializableObject());
// }
// static fromUbj(buffer) {
// return this.fromSerializableObject(Ubjson.decode(buffer));
// }
toJson() { toJson() {
return JSON.stringify(this.toSerializableObject(), null, 2); return JSON.stringify(this.toSerializableObject(), null, 2);
} }

View File

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

View File

@ -9,3 +9,7 @@
typescript@^4.3.2: typescript@^4.3.2:
version "4.3.2" version "4.3.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" 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"