Skip to content

v0.1.1: consumers typecheck clean (ship *.xsd ambient + node-forge types)#7

Merged
terrxo merged 1 commit into
mainfrom
v0.1.1-consumer-types
May 25, 2026
Merged

v0.1.1: consumers typecheck clean (ship *.xsd ambient + node-forge types)#7
terrxo merged 1 commit into
mainfrom
v0.1.1-consumer-types

Conversation

@terrxo

@terrxo terrxo commented May 25, 2026

Copy link
Copy Markdown
Contributor

Patch so consumers (fiscalize-demo, medusa-plugin) typecheck clean without each re-adding a workaround. Coordinator-authorized. No API/runtime change — 44 pass / 1 skip, tsc clean.

Problem: the engine ships TS source (no build), so a consumer's tsc/svelte-check resolves into the engine's .ts and inherits two needs → ~4 errors from inside node_modules/@grunt-it/fiscalize:

  • the *.xsd text-imports need a declare module "*.xsd" ambient;
  • node-forge needs types.

Fix:

  • validate-eslog.ts carries a triple-slash /// <reference path="../../types.d.ts" /> so the *.xsd ambient enters any consumer compilation that loads it.
  • @types/node-forgedependencies (consumers get node-forge types transitively).

Consumers on ^0.1.0 auto-inherit 0.1.1 — no consumer bump.

Out of scope (separate, unverified): the bun with { type: "text" } XSD load vs Vite ?raw is a bundler concern, not typecheck — being verified by the demo's vite build; bundler-neutral XSD load is a candidate v0.1.2 if confirmed.

🤖 Generated with Claude Code

Because the engine ships TS source (no build), a consumer's tsc/svelte-check
resolves into the engine's .ts and inherited two type-resolution needs:
- the `declare module "*.xsd"` ambient for the e-SLOG XSD text-imports, and
- node-forge types.

Fix (no API/runtime change):
- validate-eslog.ts carries a triple-slash `/// <reference path>` to types.d.ts
  so the *.xsd ambient enters any consumer's compilation that loads it.
- @types/node-forge moved to dependencies so consumers get node-forge types
  transitively.

Consumers on ^0.1.0 auto-inherit 0.1.1; no consumer bump needed. Benefits the
demo lib + the medusa-plugin. 44 pass / 1 skip, tsc clean.

Note: the bun `with { type: "text" }` XSD load vs Vite `?raw` (a separate
*bundler* concern, not typecheck) is being verified by the demo's vite build —
a bundler-neutral load is a candidate v0.1.2 if confirmed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@terrxo terrxo merged commit a7acace into main May 25, 2026
@terrxo terrxo deleted the v0.1.1-consumer-types branch May 25, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant