Skip to content

Commit 1789fda

Browse files
committed
Fixes invalid event type
1 parent 15237e8 commit 1789fda

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/webviews/apps/plus/graph/graph-wrapper/graph-wrapper.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,20 @@ const graphLaneThemeColors = new Map([
4545
['--vscode-gitlens-graphLane10Color', '#2ece9d'],
4646
]);
4747

48+
interface GraphSelection {
49+
id: string;
50+
type: GitGraphRowType;
51+
hidden: boolean;
52+
}
53+
4854
declare global {
4955
// interface HTMLElementTagNameMap {
5056
// 'gl-graph-wrapper': GlGraphWrapper;
5157
// }
5258

5359
interface GlobalEventHandlersEventMap {
5460
// passing up event map
55-
'gl-graph-change-selection': CustomEvent<{ selection: GraphRow[] }>;
61+
'gl-graph-change-selection': CustomEvent<{ selection: GraphSelection[] }>;
5662
'gl-graph-change-visible-days': CustomEvent<{ top: number; bottom: number }>;
5763
'gl-graph-mouse-leave': CustomEvent<void>;
5864
'gl-graph-row-context-menu': CustomEvent<{ graphZoneType: GraphZoneType; graphRow: GraphRow }>;
@@ -224,7 +230,7 @@ export class GlGraphWrapper extends SignalWatcher(LitElement) {
224230
}
225231

226232
private onSelectionChanged({ detail: rows }: CustomEventType<'graph-changeselection'>) {
227-
const selection = filterMap(rows, r =>
233+
const selection: GraphSelection[] = filterMap(rows, r =>
228234
r != null ? { id: r.sha, type: r.type as GitGraphRowType, hidden: r.hidden } : undefined,
229235
);
230236

0 commit comments

Comments
 (0)