Skip to content

Commit 9679b92

Browse files
committed
feat: make id writable
1 parent 745a7ca commit 9679b92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/svelte-file-tree/src/lib/tree.svelte.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export type FileNodeProps = {
66
};
77

88
export class FileNode {
9-
readonly id: string;
9+
id: string;
1010
name = $state.raw("");
1111

1212
constructor(props: FileNodeProps) {
@@ -24,7 +24,7 @@ export type FolderNodeProps<TNode extends FileNode | FolderNode<TNode> = FileTre
2424
};
2525

2626
export class FolderNode<TNode extends FileNode | FolderNode<TNode> = FileTreeNode> {
27-
readonly id: string;
27+
id: string;
2828
name = $state.raw("");
2929
children: Array<TNode> = $state([]);
3030

0 commit comments

Comments
 (0)