From c47962ba7f68388f528b46744d08f27e89f259e1 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Mon, 22 Jun 2026 17:30:51 +0800 Subject: [PATCH] chore(non-verbal): drop unused type guards from types.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit isFigure/isTable/isFormula were only re-exported from the barrel, never consumed — components narrow via the discriminated `kind` tag directly. Also refresh the NonVerbRepV3 docstring: glossarist 0.4.2 still ships the stale pre-V3 .d.ts, so the local interface is still load-bearing. Closes TODO.figures/19 Step 7 (option B: wire-shape types stay, dead code removed). --- package.json | 2 +- src/adapters/non-verbal/index.ts | 2 -- src/adapters/non-verbal/types.ts | 20 ++++---------------- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 03e9ae7..31e61f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@glossarist/concept-browser", - "version": "0.7.48", + "version": "0.7.49", "description": "Vue SPA for browsing Glossarist terminology datasets with cross-reference resolution, graph visualization, and multi-language support", "type": "module", "bin": { diff --git a/src/adapters/non-verbal/index.ts b/src/adapters/non-verbal/index.ts index e77499a..71b917d 100644 --- a/src/adapters/non-verbal/index.ts +++ b/src/adapters/non-verbal/index.ts @@ -28,8 +28,6 @@ export type { NonVerbalReference, } from './types'; -export { isFigure, isTable, isFormula } from './types'; - export { figureFromJsonLd } from './figure-bridge'; export { tableFromJsonLd } from './table-bridge'; export { formulaFromJsonLd } from './formula-bridge'; diff --git a/src/adapters/non-verbal/types.ts b/src/adapters/non-verbal/types.ts index 04eb821..235218a 100644 --- a/src/adapters/non-verbal/types.ts +++ b/src/adapters/non-verbal/types.ts @@ -104,10 +104,10 @@ export type NonVerbalEntity = Figure | Table | Formula; * * glossarist-js's runtime `NonVerbRep` (post-V3 reshape) holds the same * localized fields as `NonVerbalEntityBase` plus a `type` discriminator - * and an `images[]` array. The published `.d.ts` still describes the - * pre-V3 `ref`/`text` shape; this local interface lets consumer code - * type-check against reality. Remove when upstream ships a corrected - * `.d.ts` (TODO.figures/19). + * and an `images[]` array. The published `.d.ts` (still stale at v0.4.2) + * describes the pre-V3 `ref`/`text` shape; this local interface lets + * consumer code type-check against reality. Drop when upstream ships a + * corrected `.d.ts`. */ export interface NonVerbRepV3 extends NonVerbalEntityBase { type: string | null; @@ -119,15 +119,3 @@ export interface NonVerbalReference { entityId: string; display?: string; } - -export function isFigure(entity: NonVerbalEntity): entity is Figure { - return entity.kind === 'figure'; -} - -export function isTable(entity: NonVerbalEntity): entity is Table { - return entity.kind === 'table'; -} - -export function isFormula(entity: NonVerbalEntity): entity is Formula { - return entity.kind === 'formula'; -}