()
| 74 | * @returns Status object with current state and error (if failed) |
| 75 | */ |
| 76 | export function getInitializationStatus(): |
| 77 | | { status: 'not-started' } |
| 78 | | { status: 'pending' } |
| 79 | | { status: 'success' } |
| 80 | | { status: 'failed'; error: Error } { |
| 81 | if (initializationState === 'failed') { |
| 82 | return { |
| 83 | status: 'failed', |
| 84 | error: initializationError || new Error('Initialization failed'), |
| 85 | } |
| 86 | } |
| 87 | if (initializationState === 'not-started') { |
| 88 | return { status: 'not-started' } |
| 89 | } |
| 90 | if (initializationState === 'pending') { |
| 91 | return { status: 'pending' } |
| 92 | } |
| 93 | return { status: 'success' } |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Check whether at least one language server is connected and healthy. |
no outgoing calls
no test coverage detected