From 9a7d8cdca50c7e1bca6608f958c53cfe992fdec8 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Wed, 3 Sep 2025 09:19:13 -0700 Subject: [PATCH] [refactor] Enforce enum type safety by removing type assertions (#5315) Remove type assertions (as ManagerChannel) that bypass TypeScript's type checking and replace with explicit Record typing. This ensures invalid enum values are caught at compile time rather than runtime. - Replace type assertions with Record typing - Remove manual casting that bypassed TypeScript validation - Ensure enum values are validated during compilation --- .../dialog/content/manager/PackVersionSelectorPopover.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/dialog/content/manager/PackVersionSelectorPopover.vue b/src/components/dialog/content/manager/PackVersionSelectorPopover.vue index b6eba95be..8f7ed9b8d 100644 --- a/src/components/dialog/content/manager/PackVersionSelectorPopover.vue +++ b/src/components/dialog/content/manager/PackVersionSelectorPopover.vue @@ -110,8 +110,8 @@ const SelectedVersionValues = { } const ManagerChannelValues: Record = { - DEFAULT: 'default', // ✅ Valid - will compile - DEV: 'dev' // ✅ Valid - will compile + DEFAULT: 'default', + DEV: 'dev' } const ManagerDatabaseSourceValues: Record = {