()
| 24 | export const LSP_DIAGNOSTICS_EVENT = "acode:lsp-diagnostics-updated"; |
| 25 | |
| 26 | function isCoarsePointerDevice(): boolean { |
| 27 | if (typeof window !== "undefined") { |
| 28 | try { |
| 29 | if (window.matchMedia?.("(pointer: coarse)").matches) { |
| 30 | return true; |
| 31 | } |
| 32 | } catch (_) { |
| 33 | // Ignore matchMedia failures and fall back to maxTouchPoints. |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | return ( |
| 38 | typeof navigator !== "undefined" && |
| 39 | Number(navigator.maxTouchPoints || 0) > 0 |
| 40 | ); |
| 41 | } |
| 42 | |
| 43 | function emitDiagnosticsUpdated(): void { |
| 44 | if ( |
no outgoing calls
no test coverage detected