mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 03:26:22 +00:00
257 B
257 B
date | id | title |
---|---|---|
2020-11-24 | 40929849-a8dc-4293-8e24-afa2ff04620d | TypeScript strictNullChecks |
Description
Check if variable is null
Syntax
function foo(a?: number | null) {
if (a == null) return;
// a is number now.
}