Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
server-esm: Solve a few straightforward imports
Elian Doran20c729e62bdb
diff --git a/src/services/sync_mutex.ts b/src/services/sync_mutex.tsindex 60bb1ba4f7..5bdbaa36fc 100644--- a/src/services/sync_mutex.ts+++ b/src/services/sync_mutex.ts@@ -3,7 +3,7 @@* (like consistency checks) can use this mutex to make sure sync isn't currently running.*/-const Mutex = require('async-mutex').Mutex;+import { Mutex } from "async-mutex";const instance = new Mutex();async function doExclusively<T>(func: () => T) {diff --git a/src/share/shaca/entities/sattribute.ts b/src/share/shaca/entities/sattribute.tsindex 73298ef2e7..189d9e6a63 100644--- a/src/share/shaca/entities/sattribute.ts+++ b/src/share/shaca/entities/sattribute.ts@@ -1,10 +1,9 @@"use strict";+import AbstractShacaEntity from "./abstract_shaca_entity";import { SAttributeRow } from "./rows";import SNote from "./snote.js";-const AbstractShacaEntity = require('./abstract_shaca_entity');-class SAttribute extends AbstractShacaEntity {attributeId: string;diff --git a/src/share/shaca/entities/snote.ts b/src/share/shaca/entities/snote.tsindex 923e35a292..755404b408 100644--- a/src/share/shaca/entities/snote.ts+++ b/src/share/shaca/entities/snote.ts@@ -27,7 +27,7 @@ class SNote extends AbstractShacaEntity {parentBranches: SBranch[];parents: SNote[];children: SNote[];- private ownedAttributes: SAttribute[];+ ownedAttributes: SAttribute[];private __attributeCache: SAttribute[] | null;private __inheritableAttributeCache: SAttribute[] | null;targetRelations: SAttribute[];diff --git a/src/share/shaca/shaca-interface.ts b/src/share/shaca/shaca-interface.tsindex 43fbf9dfa6..f568e9cecf 100644--- a/src/share/shaca/shaca-interface.ts+++ b/src/share/shaca/shaca-interface.ts@@ -8,7 +8,7 @@ export default class Shaca {notes!: Record<string, SNote>;branches!: Record<string, SBranch>;childParentToBranch!: Record<string, SBranch>;- private attributes!: Record<string, SAttribute>;+ attributes!: Record<string, SAttribute>;attachments!: Record<string, SAttachment>;aliasToNote!: Record<string, SNote>;shareRootNote!: SNote | null;