( source: SettingSource | 'plugin' | 'built-in', )
| 44 | * @returns Short capitalized display name like 'User', 'Project', 'Plugin' |
| 45 | */ |
| 46 | export function getSourceDisplayName( |
| 47 | source: SettingSource | 'plugin' | 'built-in', |
| 48 | ): string { |
| 49 | switch (source) { |
| 50 | case 'userSettings': |
| 51 | return 'User' |
| 52 | case 'projectSettings': |
| 53 | return 'Project' |
| 54 | case 'localSettings': |
| 55 | return 'Local' |
| 56 | case 'flagSettings': |
| 57 | return 'Flag' |
| 58 | case 'policySettings': |
| 59 | return 'Managed' |
| 60 | case 'plugin': |
| 61 | return 'Plugin' |
| 62 | case 'built-in': |
| 63 | return 'Built-in' |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Get display name for a setting or permission rule source (lowercase, for inline use) |
no outgoing calls
no test coverage detected