From 70a6a82eec12d33e2bfc2ced38071d77da13ba88 Mon Sep 17 00:00:00 2001 From: stefafafan Date: Wed, 28 Aug 2024 10:02:28 +0900 Subject: [PATCH] fix: TypeScript's option checking return value should be `noImplicitReturns` --- docs/types/discriminated-unions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/types/discriminated-unions.md b/docs/types/discriminated-unions.md index 62dc4a049..333388c21 100644 --- a/docs/types/discriminated-unions.md +++ b/docs/types/discriminated-unions.md @@ -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) {