From acf45fd3fde034cba7a2ba72af584fce14a6dc64 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Fri, 24 Nov 2023 01:19:15 -0500 Subject: [PATCH] Updates types --- src/constants.ts | 4 ++-- src/views/viewBase.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 8ffd336..eb45521 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -471,7 +471,7 @@ export type TreeViewTypes = | 'tags' | 'workspaces' | 'worktrees'; -export type TreeViewIds = `gitlens.views.${TreeViewTypes}`; +export type TreeViewIds = `gitlens.views.${T}`; export type WebviewTypes = 'focus' | 'graph' | 'patchDetails' | 'settings' | 'timeline' | 'welcome'; export type WebviewIds = `gitlens.${WebviewTypes}`; @@ -484,7 +484,7 @@ export type WebviewViewTypes = | 'home' | 'patchDetails' | 'timeline'; -export type WebviewViewIds = `gitlens.views.${WebviewViewTypes}`; +export type WebviewViewIds = `gitlens.views.${T}`; export type ViewTypes = TreeViewTypes | WebviewViewTypes; export type ViewIds = TreeViewIds | WebviewViewIds; diff --git a/src/views/viewBase.ts b/src/views/viewBase.ts index 778df7f..bba6b5b 100644 --- a/src/views/viewBase.ts +++ b/src/views/viewBase.ts @@ -28,7 +28,7 @@ import type { WorktreesViewConfig, } from '../config'; import { viewsCommonConfigKeys, viewsConfigKeys } from '../config'; -import type { TreeViewCommandSuffixesByViewType, TreeViewTypes } from '../constants'; +import type { TreeViewCommandSuffixesByViewType, TreeViewIds, TreeViewTypes } from '../constants'; import type { Container } from '../container'; import { executeCoreCommand } from '../system/command'; import { configuration } from '../system/configuration'; @@ -113,7 +113,7 @@ export abstract class ViewBase< > implements TreeDataProvider, Disposable { - get id(): `gitlens.views.${Type}` { + get id(): TreeViewIds { return `gitlens.views.${this.type}`; }