Enable erasableSyntaxOnly TS flag

This commit is contained in:
Kalle 2025-04-26 20:15:16 +03:00
parent 7011dcb370
commit 9693f867bc
3 changed files with 15 additions and 12 deletions

View File

@ -2,11 +2,12 @@ import { useFetcher } from "@remix-run/react";
import { type ReactNode, useCallback } from "react";
import { createContext, useContext, useEffect, useState } from "react";
enum Theme {
DARK = "dark",
LIGHT = "light",
}
const themes: Array<Theme> = Object.values(Theme);
const Theme = {
DARK: "dark",
LIGHT: "light",
} as const;
type Theme = (typeof Theme)[keyof typeof Theme];
const themes = Object.values(Theme);
type ThemeContextType = {
/** The CSS class to attach to the `html` tag */

View File

@ -7,22 +7,23 @@ import type { Result } from "./unions";
/**
* The possible status for a match.
*/
export enum Status {
export const Status = {
/** The two matches leading to this one are not completed yet. */
Locked = 0,
Locked: 0,
/** One participant is ready and waiting for the other one. */
Waiting = 1,
Waiting: 1,
/** Both participants are ready to start. */
Ready = 2,
Ready: 2,
/** The match is running. */
Running = 3,
Running: 3,
/** The match is completed. */
Completed = 4,
}
Completed: 4,
};
export type Status = (typeof Status)[keyof typeof Status];
/**
* The results of a participant in a match.

View File

@ -4,6 +4,7 @@
"lib": ["DOM", "DOM.Iterable", "es2024"],
"module": "ESNext",
"isolatedModules": true,
"erasableSyntaxOnly": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "Bundler",