All files / domain tree-item.dto.ts

100% Statements 6/6
100% Branches 0/0
100% Functions 2/2
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 121x 2x 2x   2x         2x    
export class TreeItem { 
  public readonly mode = '100644' as const
  public readonly type = 'blob' as const
 
  private constructor(public readonly sha: string, public readonly path: string) {
    
  }
  
  static create(props: Pick<TreeItem, 'sha' | 'path'>): TreeItem {
    return new TreeItem(props.sha, props.path)
  }
}