basic search tests

This commit is contained in:
zadam
2020-05-22 09:38:30 +02:00
parent cd48135394
commit ee053b9fdf
17 changed files with 202 additions and 44 deletions

View File

@@ -6,16 +6,20 @@ const Attribute = require('./entities/attribute');
class NoteCache {
constructor() {
this.reset();
}
reset() {
/** @type {Object.<String, Note>} */
this.notes = null;
this.notes = [];
/** @type {Object.<String, Branch>} */
this.branches = null;
this.branches = [];
/** @type {Object.<String, Branch>} */
this.childParentToBranch = {};
/** @type {Object.<String, Attribute>} */
this.attributes = null;
this.attributes = [];
/** @type {Object.<String, Attribute[]>} Points from attribute type-name to list of attributes them */
this.attributeIndex = null;
this.attributeIndex = {};
this.loaded = false;
this.loadedResolve = null;