| 105 | } |
| 106 | |
| 107 | function configurationValue(settings: unknown, section?: string) { |
| 108 | if (!section) return settings ?? null |
| 109 | const result = section.split(".").reduce<unknown>((acc, key) => { |
| 110 | if (!acc || typeof acc !== "object" || !(key in acc)) return undefined |
| 111 | return (acc as Record<string, unknown>)[key] |
| 112 | }, settings) |
| 113 | return result ?? null |
| 114 | } |
| 115 | |
| 116 | // TypeScript's built-in LSP pushes diagnostics aggressively on first open. |
| 117 | // We seed the push cache on the very first publish so waitForFreshPush can |