v0.1.1: consumers typecheck clean (ship *.xsd ambient + node-forge types)#7
Merged
Conversation
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>
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.
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-checkresolves into the engine's.tsand inherits two needs → ~4 errors from insidenode_modules/@grunt-it/fiscalize:*.xsdtext-imports need adeclare module "*.xsd"ambient;node-forgeneeds types.Fix:
validate-eslog.tscarries a triple-slash/// <reference path="../../types.d.ts" />so the*.xsdambient enters any consumer compilation that loads it.@types/node-forge→dependencies(consumers get node-forge types transitively).Consumers on
^0.1.0auto-inherit0.1.1— no consumer bump.Out of scope (separate, unverified): the bun
with { type: "text" }XSD load vs Vite?rawis a bundler concern, not typecheck — being verified by the demo'svite build; bundler-neutral XSD load is a candidate v0.1.2 if confirmed.🤖 Generated with Claude Code