(comments: LineComment[])
| 67 | } |
| 68 | |
| 69 | function group(comments: LineComment[]) { |
| 70 | return comments.reduce<Record<string, LineComment[]>>((acc, comment) => { |
| 71 | const list = acc[comment.file] |
| 72 | const next = cloneComment(comment) |
| 73 | if (list) { |
| 74 | list.push(next) |
| 75 | return acc |
| 76 | } |
| 77 | acc[comment.file] = [next] |
| 78 | return acc |
| 79 | }, {}) |
| 80 | } |
| 81 | |
| 82 | function createCommentSessionState(store: Store<CommentStore>, setStore: SetStoreFunction<CommentStore>) { |
| 83 | const [state, setState] = createStore({ |
no test coverage detected