Apply consistent, type-safe idioms and keep logic/formatting easy to scan.
// preferred if the surrounding code uses boolean guards
theme && devtools.setTheme(theme)
as any when TypeScript can infer/narrow:
const options = query.options // avoid unnecessary `as any`
typeof ... === 'function' checks; use shared helpers (e.g., a resolveValueOrFunction utility) across the codebase.Use these guidelines to guide refactors during reviews, not only new code.
Enter the URL of a public GitHub repository