mirror of
https://git.disroot.org/wolfree/wolfree-dockerfile
synced 2024-12-27 15:32:37 +01:00
clarify the exhaustiveness check with TypeScript
This commit is contained in:
parent
b6fa0257c8
commit
625770866d
@ -1,6 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: AGPL-3.0-or-later */
|
/* SPDX-License-Identifier: AGPL-3.0-or-later */
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import typescriptNever from "./typescriptNever";
|
||||||
|
|
||||||
export default (event: React.FormEvent<HTMLFormElement>): void => {
|
export default (event: React.FormEvent<HTMLFormElement>): void => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@ -15,8 +16,7 @@ export default (event: React.FormEvent<HTMLFormElement>): void => {
|
|||||||
} else if (i instanceof File) {
|
} else if (i instanceof File) {
|
||||||
console.warn({ i });
|
console.warn({ i });
|
||||||
} else {
|
} else {
|
||||||
const typescriptExhaustivenessCheck: never = i;
|
typescriptNever(i);
|
||||||
console.warn({ typescriptExhaustivenessCheck });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.location.assign(url);
|
window.location.assign(url);
|
||||||
|
Loading…
Reference in New Issue
Block a user