From 625770866d20902ec9aa1972b4d958080ed776bf Mon Sep 17 00:00:00 2001 From: name Date: Sat, 30 Sep 2023 13:08:51 +0000 Subject: clarify the exhaustiveness check with TypeScript --- docusaurus/src/functions/submitMathInputForm.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docusaurus/src/functions') diff --git a/docusaurus/src/functions/submitMathInputForm.ts b/docusaurus/src/functions/submitMathInputForm.ts index cf3294b..bb7c34e 100644 --- a/docusaurus/src/functions/submitMathInputForm.ts +++ b/docusaurus/src/functions/submitMathInputForm.ts @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: AGPL-3.0-or-later */ import React from "react"; +import typescriptNever from "./typescriptNever"; export default (event: React.FormEvent): void => { event.preventDefault(); @@ -15,8 +16,7 @@ export default (event: React.FormEvent): void => { } else if (i instanceof File) { console.warn({ i }); } else { - const typescriptExhaustivenessCheck: never = i; - console.warn({ typescriptExhaustivenessCheck }); + typescriptNever(i); } window.location.assign(url); -- cgit v1.2.3