(sink: SinkName)
| 16 | * Call at per-event dispatch sites instead. |
| 17 | */ |
| 18 | export function isSinkKilled(sink: SinkName): boolean { |
| 19 | const config = getDynamicConfig_CACHED_MAY_BE_STALE< |
| 20 | Partial<Record<SinkName, boolean>> |
| 21 | >(SINK_KILLSWITCH_CONFIG_NAME, {}) |
| 22 | // getFeatureValue_CACHED_MAY_BE_STALE guards on `!== undefined`, so a |
| 23 | // cached JSON null leaks through instead of falling back to {}. |
| 24 | return config?.[sink] === true |
| 25 | } |
| 26 |
no test coverage detected