@@ -7,22 +7,25 @@ import { sortCompare } from '../../system/string';
77import type { FileHistoryView } from '../fileHistoryView' ;
88import type { StashesView } from '../stashesView' ;
99import type { ViewsWithCommits } from '../viewBase' ;
10+ import type { ViewFileNode } from './viewNode' ;
1011import { ContextValues , ViewNode } from './viewNode' ;
1112
12- export interface FileNode extends ViewNode {
13+ export interface FileNode extends ViewFileNode {
1314 folderName : string ;
14- label ?: string ;
1515 priority : number ;
16+
17+ label ?: string ;
1618 relativePath ?: string ;
17- root ?: HierarchicalItem < FileNode > ;
19+
20+ // root?: HierarchicalItem<FileNode>;
1821}
1922
2023export class FolderNode extends ViewNode < ViewsWithCommits | FileHistoryView | StashesView > {
2124 readonly priority : number = 1 ;
2225
2326 constructor (
2427 view : ViewsWithCommits | FileHistoryView | StashesView ,
25- parent : ViewNode ,
28+ protected override parent : ViewNode ,
2629 public readonly repoPath : string ,
2730 public readonly folderName : string ,
2831 public readonly root : HierarchicalItem < FileNode > ,
@@ -56,7 +59,7 @@ export class FolderNode extends ViewNode<ViewsWithCommits | FileHistoryView | St
5659 children . push (
5760 new FolderNode (
5861 this . view ,
59- this . folderName ? this : this . parent ! ,
62+ this . folderName ? this : this . parent ,
6063 this . repoPath ,
6164 folder . name ,
6265 folder ,
@@ -68,7 +71,7 @@ export class FolderNode extends ViewNode<ViewsWithCommits | FileHistoryView | St
6871 }
6972
7073 // Make sure to set the parent
71- ( folder . value as any ) . parent = this . folderName ? this : this . parent ! ;
74+ folder . value . parent = this . folderName ? this : this . parent ;
7275 folder . value . relativePath = this . root . relativePath ;
7376 children . push ( folder . value ) ;
7477 }
0 commit comments