UNPKG

pi-lens

Version:

Real-time code feedback for pi — LSP, linters, formatters, type-checking, structural analysis & booboo

15 lines (14 loc) • 348 B
id: ts-defensive-null-guard valid: - | function f(x) { if (x === null) return null; } - | function f(x) { if (x === null) return null; if (x === undefined) return null; } invalid: - | function f(x) { if (x === null || x === undefined) { return null; } } - | function f(x) { if (x == null) { return null; } }