Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/types/discriminated-unions.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ function area(s: Shape) {

[references-discriminated-union]:https://github.com/Microsoft/TypeScript/pull/9163

### strictNullChecks
### noImplicitReturns

If using *strictNullChecks* and doing exhaustive checks, TypeScript might complain "not all code paths return a value". You can silence that by simply returning the `_exhaustiveCheck` variable (of type `never`). So:
If using *noImplicitReturns* and doing exhaustive checks, TypeScript might complain "not all code paths return a value". You can silence that by simply returning the `_exhaustiveCheck` variable (of type `never`). So:

```ts
function area(s: Shape) {
Expand Down