mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
feat: add types for all entities
This commit is contained in:
@@ -43,6 +43,7 @@ class Database {
|
||||
.slice(0, 3)
|
||||
.join(" ");
|
||||
this.notes[timestamp] = {
|
||||
type: "note",
|
||||
title,
|
||||
content: note.content,
|
||||
pinned: note.pinned || false,
|
||||
@@ -113,6 +114,7 @@ class Database {
|
||||
}
|
||||
}
|
||||
this.notebooks[id] = {
|
||||
type: "notebook",
|
||||
title: notebook.title,
|
||||
description: notebook.description,
|
||||
dateCreated: id,
|
||||
@@ -286,6 +288,7 @@ function getItem(id, key) {
|
||||
|
||||
function makeTopic(topic) {
|
||||
return {
|
||||
type: "topic",
|
||||
title: topic,
|
||||
dateCreated: Date.now(),
|
||||
totalNotes: 0,
|
||||
|
||||
Reference in New Issue
Block a user