From 06b4982f9bf2db2f1d44e12fe3f2ff14375c49f0 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Tue, 11 Oct 2022 23:36:39 -0400 Subject: [PATCH] Decouples storage types from real types - Hopefully ensures we will get build errors if the types change --- src/plus/webviews/graph/protocol.ts | 2 ++ src/storage.ts | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plus/webviews/graph/protocol.ts b/src/plus/webviews/graph/protocol.ts index 3e22375..7d7d2e9 100644 --- a/src/plus/webviews/graph/protocol.ts +++ b/src/plus/webviews/graph/protocol.ts @@ -21,6 +21,8 @@ import type { Subscription } from '../../../subscription'; import type { DateTimeFormat } from '../../../system/date'; import { IpcCommandType, IpcNotificationType } from '../../../webviews/protocol'; +export type { GraphRefType } from '@gitkraken/gitkraken-components'; + export type GraphColumnsSettings = Record; export type GraphSelectedRows = Record; export type GraphAvatars = Record; diff --git a/src/storage.ts b/src/storage.ts index cf7b93b..8a3ed3f 100644 --- a/src/storage.ts +++ b/src/storage.ts @@ -1,4 +1,3 @@ -import type { GraphRefType } from '@gitkraken/gitkraken-components'; import type { Disposable, Event, ExtensionContext, SecretStorageChangeEvent } from 'vscode'; import { EventEmitter } from 'vscode'; import type { ViewShowBranchComparison } from './config'; @@ -235,10 +234,12 @@ export interface StoredGraphColumn { width?: number; } +export type StoredGraphRefType = 'head' | 'remote' | 'tag'; + export interface StoredGraphHiddenRef { id: string; name: string; - type: GraphRefType; + type: StoredGraphRefType; avatarUrl?: string; }