Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Emphasize that void accepts null unless strictNullChecks #1096

Merged
merged 1 commit into from
Aug 20, 2019

Conversation

wataash
Copy link
Contributor

@wataash wataash commented Aug 20, 2019

Though this specification was written in #1053, I still got confused when I read the section "Void":

null can't be assigned to void on TypeScript playground... is document wrong?

And I had stayed confused for 10 minutes until I carefully read the next section (Null and Undefined).

This changes remove the time window of confusing between these two sections, complementing #1053.

@orta
Copy link
Contributor

orta commented Aug 20, 2019

👍 works for me, thanks @wataash

@orta orta merged commit 7408e52 into microsoft:master Aug 20, 2019
@wataash wataash deleted the void-strict-null-checks branch August 21, 2019 01:30
wataash referenced this pull request Aug 22, 2019
1. Point out that 'any' disables checking whereas 'Object' does not.
2. Point out that you can define variables of type 'void' but they can
only be assigned 'undefined'.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants