## Lesson — When using optional diagnostic callbacks like 'onWarn?.()',

**Tags:** dx, typescript, logging

When using optional diagnostic callbacks like 'onWarn?.()', always provide a fallback to 'console.warn'. This prevents silent degradation of diagnostics when the callback is omitted by future callers.
