server-ts: Fix some issues from self-review

This commit is contained in:
Elian Doran
2024-04-02 23:00:04 +03:00
parent 08f0c01eef
commit b84b27692c
9 changed files with 40 additions and 168 deletions

View File

@@ -21,7 +21,7 @@ interface AttachmentOpts {
* Becca is a backend cache of all notes, branches, and attributes.
* There's a similar frontend cache Froca, and share cache Shaca.
*/
class Becca {
export default class Becca {
loaded!: boolean;
notes!: Record<string, BNote>;
@@ -280,4 +280,12 @@ class Becca {
}
}
export = Becca;
/**
* This interface contains the data that is shared across all the objects of a given derived class of {@link AbstractBeccaEntity}.
* For example, all BAttributes will share their content, but all BBranches will have another set of this data.
*/
export interface ConstructorData<T extends AbstractBeccaEntity<T>> {
primaryKeyName: string;
entityName: string;
hashedProperties: (keyof T)[];
}