clarify the exhaustiveness check with TypeScript

This commit is contained in:
name 2023-09-30 13:08:51 +00:00
parent b6fa0257c8
commit 625770866d

View File

@ -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<HTMLFormElement>): void => {
event.preventDefault();
@ -15,8 +16,7 @@ export default (event: React.FormEvent<HTMLFormElement>): void => {
} else if (i instanceof File) {
console.warn({ i });
} else {
const typescriptExhaustivenessCheck: never = i;
console.warn({ typescriptExhaustivenessCheck });
typescriptNever(i);
}
window.location.assign(url);