chore(non-verbal): drop unused type guards from types.ts#73
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes TODO.figures/19 Step 7.
What
isFigure/isTable/isFormulafromtypes.ts+ barrel re-export.They were never consumed — components narrow via the discriminated
kindtag directly.NonVerbRepV3docstring: glossarist 0.4.2 still ships the stale pre-V3.d.ts,so the local interface stays load-bearing. Drop condition updated accordingly.
Why Option B (not Option A)
TODO 19 Step 7 offered two paths:
instanceof. ~10-file refactor.Option A's DRY gain is real but marginal — the consumer still needs JSON-LD bridges
until the V2 GCR-direct pipeline lands, so the bridges would just swap one literal
shape for a class constructor call. Picked B. The remaining interfaces (
Figure,Table,Formula,FigureImage,LocalizedString, etc.) are all in active useas the wire contract between bridges and components.
Verification
npm test: 797/797 passingvue-tsc --noEmit: clean