You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are Coding Guidelines for Contributors to TypeScript. This is NOT a prescriptive guideline for the TypeScript community. These guidelines are meant for contributors to the TypeScript project's codebase. We have chosen many of them for team consistency.
SQL NULL should be null. A value not being there (because the select is missing it or something else) is undefined. null is a real value we can type with this, like string or number. If you use null for both cases, it's hard to track the issue of a missing column down.
TypeScript prefers
undefined
tonull
because it means missing value and as a property, there is syntax to support this – the ?-operator.We should convert the SQL NULL value into
undefined
instead ofnull
for this reason.Note that JSON data, we'll always have
null
for anull
value (there is noundefined
in JSON, those properties are simply dropped).The text was updated successfully, but these errors were encountered: