
The Window.allCards property in global.d.ts defines its element type inline, duplicating the CardInfo interface already declared in types.ts. Using an import reference eliminates the duplication and ensures changes to CardInfo propagate automatically.
Context
The global.d.ts file declares Window.allCards with an inline object type that has the same shape as the CardInfo interface in src/scripts/types.ts — both have title, side_code, faction_code, type_code, image, and optional code fields. If a field is added or narrowed in CardInfo (e.g., issue #295 proposes narrowing side_code to a literal union), the Window declaration must be updated separately or the two definitions drift apart silently. TypeScript declaration files support import() type references, so allCards can be typed as import('./scripts/types.ts').CardInfo[] without introducing a runtime import.
Affected Files
src/global.d.ts:53 — Replace the inline { title: string; side_code: string; ... }[] type for allCards with import('./scripts/types.ts').CardInfo[]
Requirements

Verification
- npm run typecheck
- grep -n 'allCards' src/global.d.ts
Not In Scope
Evidence
src/global.d.ts:52-60 — allCards is typed as { title: string; side_code: string; faction_code: string; type_code: string; image: string; code?: string; }[] — an inline copy of the CardInfo interface
src/scripts/types.ts:18-25 — CardInfo interface has identical fields: title: string, side_code: string, faction_code: string, type_code: string, image: string, code?: string
Arasaka Queue Planning Division.

The
Window.allCardsproperty inglobal.d.tsdefines its element type inline, duplicating theCardInfointerface already declared intypes.ts. Using an import reference eliminates the duplication and ensures changes toCardInfopropagate automatically.Context
The
global.d.tsfile declaresWindow.allCardswith an inline object type that has the same shape as theCardInfointerface insrc/scripts/types.ts— both havetitle,side_code,faction_code,type_code,image, and optionalcodefields. If a field is added or narrowed inCardInfo(e.g., issue #295 proposes narrowingside_codeto a literal union), theWindowdeclaration must be updated separately or the two definitions drift apart silently. TypeScript declaration files supportimport()type references, soallCardscan be typed asimport('./scripts/types.ts').CardInfo[]without introducing a runtime import.Affected Files
src/global.d.ts:53— Replace the inline{ title: string; side_code: string; ... }[]type forallCardswithimport('./scripts/types.ts').CardInfo[]Requirements
Window.allCardsis typed asimport('./scripts/types.ts').CardInfo[]instead of an inline object typeallCardsis fully removed — no residual duplicatenpm run typecheckpasses with no new errorsVerification
Not In Scope
side_codeortype_codeto literal unions (covered by issue NarrowCardInfo.side_codeandtype_codeto literal union types intypes.ts#295)Windowproperties or theElement/Eventaugmentationsglobal.d.tsto a module — it must remain an ambient declaration fileEvidence
src/global.d.ts:52-60—allCardsis typed as{ title: string; side_code: string; faction_code: string; type_code: string; image: string; code?: string; }[]— an inline copy of theCardInfointerfacesrc/scripts/types.ts:18-25—CardInfointerface has identical fields:title: string,side_code: string,faction_code: string,type_code: string,image: string,code?: stringArasaka Queue Planning Division.