Skip to content

Commit 45a4058

Browse files
committed
comments improved
1 parent 2a2f103 commit 45a4058

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/application/services/useNoteHistory.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,19 @@ interface UseNoteHistoryComposableState {
1111
*/
1212
noteHistory: Ref<NoteHistoryMeta[] | null>;
1313

14+
/**
15+
* Content of the certain history record
16+
*/
1417
historyContent: Ref<NoteHistoryRecord['content'] | undefined>;
18+
19+
/**
20+
* Tools that are used in current history content
21+
*/
1522
historyTools: Ref<NoteHistoryRecord['tools'] | undefined>;
23+
24+
/**
25+
* Metadata of the history record
26+
*/
1627
historyMeta: Ref<NoteHistoryMeta | undefined>;
1728
}
1829

@@ -29,10 +40,28 @@ interface UseNoteHistoryComposableOptions {
2940
}
3041

3142
export default function useNoteHistory(options: UseNoteHistoryComposableOptions): UseNoteHistoryComposableState {
43+
/**
44+
* Array of the note history metadata
45+
* Used fot presentation of the note history
46+
*/
3247
const noteHistory = ref<NoteHistoryMeta[] | null>(null);
3348

49+
/**
50+
* Content of the current note history record
51+
* Used for the presentation of certain history record
52+
*/
3453
const historyContent = ref<NoteHistoryRecord['content'] | undefined>(undefined);
54+
55+
/**
56+
* Note tools used in current note history content
57+
* Used for the content displaying in editor
58+
*/
3559
const historyTools = ref<NoteHistoryRecord['tools'] | undefined>(undefined);
60+
61+
/**
62+
* Meta data of the note history record
63+
* Used fot informative presnetation of the note history record
64+
*/
3665
const historyMeta = ref<NoteHistoryMeta | undefined>(undefined);
3766

3867
const currentNoteId = computed(() => toValue(options.noteId));

0 commit comments

Comments
 (0)