This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
void does not accept null if strictNullChecks is enabled #468
Closed
Description
Updated: I find a void
variable can not be assigned to null
null
can not be assigned to a void
variable if I enable strictNullChecks
on lastest TypeScript nodejs package.
But in https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Basic%20Types.md#L207, it says:
However, when using the
--strictNullChecks
flag,null
andundefined
are only assignable tovoid
and their respective types.
Is there any mistake made by me or the document?
Metadata
Metadata
Assignees
Labels
No labels