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
Copy file name to clipboardExpand all lines: pages/Basic Types.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -179,10 +179,11 @@ function warnUser(): void {
179
179
}
180
180
```
181
181
182
-
Declaring variables of type `void` is not useful because you can only assign `undefined`or `null` to them:
182
+
Declaring variables of type `void` is not useful because you can only assign `null` (only if `--strictNullChecks` is not specified, see next section) or `undefined` to them:
183
183
184
184
```ts
185
185
let unusable:void=undefined;
186
+
unusable=null; // OK if `--strictNullChecks` is not given
0 commit comments