From 95348dd9f51dc73a09391e7f9b0ba87b4e2010ed Mon Sep 17 00:00:00 2001 From: Tom Tang <4220945+shiba4life@users.noreply.github.com> Date: Tue, 12 May 2026 15:07:12 +0800 Subject: [PATCH] refactor(constants): drop 2 dead SchemaState type aliases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both aliases are zero-consumer — verified by `git grep` against origin/main 9f65e5b. The canonical `SchemaState` type lives in `src/types/schema.ts:38`, which is what `schemaClient.ts:7` imports. The two deleted aliases were duplicate re-derivations nobody imported from `constants/*`. - constants/api.ts:152-153 — banner comment + dead alias (the `SCHEMA_STATES` value re-export on lines 134-136 stays live). - constants/schemas.ts:14 — dead alias (the `SCHEMA_STATES` value and `RANGE_SCHEMA_CONFIG` stay live). Follow-up to the constants/ cleanup pattern in #1014 and #1015. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/server/static-react/src/constants/api.ts | 4 ---- src/server/static-react/src/constants/schemas.ts | 2 -- 2 files changed, 6 deletions(-) diff --git a/src/server/static-react/src/constants/api.ts b/src/server/static-react/src/constants/api.ts index e5bb1e67..29edfac7 100644 --- a/src/server/static-react/src/constants/api.ts +++ b/src/server/static-react/src/constants/api.ts @@ -147,7 +147,3 @@ export const CACHE_KEYS = { VERIFY: "verify", PARAMETERIZED_QUERY: "parameterized-query", } as const; - - -// Type definitions for better type safety -export type SchemaState = (typeof SCHEMA_STATES)[keyof typeof SCHEMA_STATES]; diff --git a/src/server/static-react/src/constants/schemas.ts b/src/server/static-react/src/constants/schemas.ts index c12d7112..34103e83 100644 --- a/src/server/static-react/src/constants/schemas.ts +++ b/src/server/static-react/src/constants/schemas.ts @@ -11,8 +11,6 @@ export const SCHEMA_STATES = { ERROR: 'error', } as const; -export type SchemaState = (typeof SCHEMA_STATES)[keyof typeof SCHEMA_STATES]; - // Range schema constants export const RANGE_SCHEMA_CONFIG = { FIELD_TYPE: 'Range',