[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<string, ManagerChannel> typing
- Remove manual casting that bypassed TypeScript validation
- Ensure enum values are validated during compilation
This commit is contained in:
Christian Byrne
2025-09-03 09:19:13 -07:00
committed by GitHub
parent 35f5773deb
commit 9a7d8cdca5

View File

@@ -110,8 +110,8 @@ const SelectedVersionValues = {
}
const ManagerChannelValues: Record<string, ManagerChannel> = {
DEFAULT: 'default', // ✅ Valid - will compile
DEV: 'dev' // ✅ Valid - will compile
DEFAULT: 'default',
DEV: 'dev'
}
const ManagerDatabaseSourceValues: Record<string, ManagerDatabaseSource> = {