( scope: string, )
| 88 | * @throws Error if scope is not a valid installable scope |
| 89 | */ |
| 90 | export function assertInstallableScope( |
| 91 | scope: string, |
| 92 | ): asserts scope is InstallableScope { |
| 93 | if (!VALID_INSTALLABLE_SCOPES.includes(scope as InstallableScope)) { |
| 94 | throw new Error( |
| 95 | `Invalid scope "${scope}". Must be one of: ${VALID_INSTALLABLE_SCOPES.join(', ')}`, |
| 96 | ) |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * Type guard to check if a scope is an installable scope (not 'managed'). |
no outgoing calls
no test coverage detected