profileRyan KesPGP keyI build stuffEmailGithubTwitterLast.fmMastodonMatrix

TypeScript strictNullChecks

Description

Check if variable is null

Syntax

function foo(a?: number | null) {
  if (a == null) return

  // a is number now.
}