diff --git a/src/constants.ts b/src/constants.ts index 312c81c..a5622cf 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -457,7 +457,7 @@ export type TreeViewTypes = export type TreeViewIds = `gitlens.views.${TreeViewTypes}`; export type WebviewTypes = 'graph' | 'settings' | 'timeline' | 'welcome' | 'focus'; -export type WebviewIds = `gitlens.views.${WebviewTypes}`; +export type WebviewIds = `gitlens.${WebviewTypes}`; export type WebviewViewTypes = 'account' | 'commitDetails' | 'graph' | 'graphDetails' | 'home' | 'timeline'; export type WebviewViewIds = `gitlens.views.${WebviewViewTypes}`; diff --git a/src/eventBus.ts b/src/eventBus.ts index 379d053..515e0a8 100644 --- a/src/eventBus.ts +++ b/src/eventBus.ts @@ -1,7 +1,7 @@ import type { Disposable, Uri } from 'vscode'; import { EventEmitter } from 'vscode'; import type { ViewsConfigKeys } from './config'; -import type { CustomEditorTypes, WebviewTypes, WebviewViewTypes } from './constants'; +import type { CustomEditorIds, WebviewIds, WebviewViewIds } from './constants'; import type { GitCaches } from './git/gitProvider'; import type { GitCommit } from './git/models/commit'; import type { GitRevisionReference } from './git/models/reference'; @@ -39,11 +39,7 @@ interface EventBusEvent { source?: EventBusSource | undefined; } -export type EventBusSource = - | `gitlens.${CustomEditorTypes}` - | `gitlens.${WebviewTypes}` - | `gitlens.views.${WebviewViewTypes}` - | `gitlens.views.${ViewsConfigKeys}`; +export type EventBusSource = CustomEditorIds | WebviewIds | WebviewViewIds | `gitlens.views.${ViewsConfigKeys}`; export type EventBusOptions = { source?: EventBusSource; diff --git a/src/system/webview.ts b/src/system/webview.ts index 0755534..65e70c7 100644 --- a/src/system/webview.ts +++ b/src/system/webview.ts @@ -1,7 +1,7 @@ -import type { WebviewTypes, WebviewViewTypes } from '../constants'; +import type { WebviewIds, WebviewViewIds } from '../constants'; export interface WebviewItemContext { - webview?: `gitlens.${WebviewTypes}` | `gitlens.views.${WebviewViewTypes}`; + webview?: WebviewIds | WebviewViewIds; webviewItem: string; webviewItemValue: TValue; } @@ -15,7 +15,7 @@ export function isWebviewItemContext( } export interface WebviewItemGroupContext { - webview?: `gitlens.${WebviewTypes}` | `gitlens.views.${WebviewViewTypes}`; + webview?: WebviewIds | WebviewViewIds; webviewItemGroup: string; webviewItemGroupValue: TValue; }