refactor(notemap): use proper types

This commit is contained in:
Elian Doran
2025-10-04 18:55:26 +03:00
parent d2dda95654
commit cf37549f19
3 changed files with 33 additions and 30 deletions

View File

@@ -11,28 +11,26 @@ interface GroupedLink {
names: string[];
}
export interface Node extends NodeObject {
export interface NoteMapNodeObject extends NodeObject {
id: string;
name: string;
type: string;
color: string;
}
export interface Link extends LinkObject<NodeObject> {
export interface NoteMapLinkObject extends LinkObject<NoteMapNodeObject> {
id: string;
name: string;
x: number;
y: number;
source: Node;
target: Node;
x?: number;
y?: number;
}
export interface NotesAndRelationsData {
nodes: Node[];
nodes: NoteMapNodeObject[];
links: {
id: string;
source: string;
target: string;
source: string | NoteMapNodeObject;
target: string | NoteMapNodeObject;
name: string;
}[];
noteIdToSizeMap: Record<string, number>;